Patchwork [07/13] hid: ntrig: Remove unused device ids

login
register
mail settings
Submitter Henrik Rydberg
Date Sept. 10, 2010, 5:14 p.m.
Message ID <1284138859-32673-8-git-send-email-rydberg@euromail.se>
Download mbox | patch
Permalink /patch/64431/
State Accepted
Delegated to: Leann Ogasawara
Headers show

Comments

Henrik Rydberg - Sept. 10, 2010, 5:14 p.m.
The current set of devices (Dell Studio 17, Dell XT2, HP TX2, Lenovo T810s)
all use the same device id (1b96:0001). However, the driver defines a
range of device ids. Remove these and reintroduce when needed, in
anticipation that new devices will not work with the current driver
anyways.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
---
 drivers/hid/hid-ntrig.c |   43 +++++--------------------------------------
 1 files changed, 5 insertions(+), 38 deletions(-)

Patch

diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c
index fb69b8c..fa10883 100644
--- a/drivers/hid/hid-ntrig.c
+++ b/drivers/hid/hid-ntrig.c
@@ -865,45 +865,12 @@  static void ntrig_remove(struct hid_device *hdev)
 	kfree(hid_get_drvdata(hdev));
 }
 
+#define NTRIG_DEVICE(id)						\
+	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, id),			\
+			.driver_data = NTRIG_DUPLICATE_USAGES  }
+
 static const struct hid_device_id ntrig_devices[] = {
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_1),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_2),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_3),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_4),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_5),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_6),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_7),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_8),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_9),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_10),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_11),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_12),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_13),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_14),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_15),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_16),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_17),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_18),
-		.driver_data = NTRIG_DUPLICATE_USAGES },
+	NTRIG_DEVICE(0x0001),
 	{ }
 };
 MODULE_DEVICE_TABLE(hid, ntrig_devices);