[PATCH 027/368] Staging: asus_oled: Add defines for asus vendor_id and device_id to be consistent with hid-ids.h

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

From: Peter Huewe <peterhuewe@gmx.de>

This almost trivial patch replaces the hardcoded values for the vendor and
device ids with defines, as they are used in drivers/hid/hid-ids.h

For me this seems to be more consistent, however as drivers/hid/hid-ids.h
is not within the default include directory I had to redefine the defines here
(maybe move the hid-ids.h to include/linux ?)

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/asus_oled/asus_oled.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/asus_oled/asus_oled.c b/drivers/staging/asus_oled/asus_oled.c
index 43c57b7..0c1fb0d 100644
--- a/drivers/staging/asus_oled/asus_oled.c
+++ b/drivers/staging/asus_oled/asus_oled.c
@@ -52,6 +52,10 @@
 #define ASUS_OLED_DISP_HEIGHT		32
 #define ASUS_OLED_PACKET_BUF_SIZE	256
 
+#define USB_VENDOR_ID_ASUS      0x0b05
+#define USB_DEVICE_ID_ASUS_LCM      0x1726
+#define USB_DEVICE_ID_ASUS_LCM2     0x175b
+
 MODULE_AUTHOR("Jakub Schmidtke, sjakub@gmail.com");
 MODULE_DESCRIPTION("Asus OLED Driver v" ASUS_OLED_VERSION);
 MODULE_LICENSE("GPL");
@@ -85,16 +89,18 @@ struct oled_dev_desc_str {
 /* table of devices that work with this driver */
 static struct usb_device_id id_table[] = {
 	/* Asus G1/G2 (and variants)*/
-	{ USB_DEVICE(0x0b05, 0x1726) },
+	{ USB_DEVICE(USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM) },
 	/* Asus G50V (and possibly others - G70? G71?)*/
-	{ USB_DEVICE(0x0b05, 0x175b) },
+	{ USB_DEVICE(USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM2) },
 	{ },
 };
 
 /* parameters of specific devices */
 static struct oled_dev_desc_str oled_dev_desc_table[] = {
-	{ 0x0b05, 0x1726, 128, PACK_MODE_G1, "G1/G2" },
-	{ 0x0b05, 0x175b, 256, PACK_MODE_G50, "G50" },
+	{ USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM, 128, PACK_MODE_G1,
+		"G1/G2" },
+	{ USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM2, 256, PACK_MODE_G50,
+		"G50" },
 	{ },
 };
 
-- 
1.7.0.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 027/368] Staging: asus_oled: Add defines for asus v ..., Greg KH, (Thu Mar 4, 1:03 pm)
[PATCH 043/368] Staging: add dt3155 driver, Greg KH, (Thu Mar 4, 1:03 pm)
[PATCH 045/368] Staging: dt3155: add TODO file, Greg KH, (Thu Mar 4, 1:03 pm)
[GIT PATCH] STAGING patches for 2.6.33-git, Greg KH, (Thu Mar 4, 1:04 pm)
[PATCH 190/368] Staging: et131x: kill EXP_ROM, Greg KH, (Thu Mar 4, 1:06 pm)
[PATCH 222/368] Staging: otus: fix memory leak, Greg KH, (Thu Mar 4, 1:06 pm)
[PATCH 264/368] staging: dream: Codestyle fix, Greg KH, (Thu Mar 4, 1:07 pm)
Re: [PATCH 264/368] staging: dream: Codestyle fix, Pavel Machek, (Fri Mar 5, 12:08 am)