linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/7] usbhid: convert Wacom and Codemercs quirks to list entries
@ 2007-03-19  4:21 Paul Walmsley
  0 siblings, 0 replies; only message in thread
From: Paul Walmsley @ 2007-03-19  4:21 UTC (permalink / raw)
  To: linux-input

From: Paul Walmsley <paul@booyaka.com>

Convert the existing Wacom and Codemercs quirks from
special-purpose code to quirks list entries with non-0xffff masks.

Signed-off-by: Paul Walmsley <paul@booyaka.com>

---
  dev/drivers/usb/input/hid-core.c |   14 ++++----------
  1 file changed, 4 insertions(+), 10 deletions(-)

Index: linux/dev/drivers/usb/input/hid-core.c
===================================================================
--- linux.orig/dev/drivers/usb/input/hid-core.c
+++ linux/dev/drivers/usb/input/hid-core.c
@@ -688,7 +688,6 @@ void usbhid_init_reports(struct hid_devi

  #define USB_VENDOR_ID_CODEMERCS		0x07c0
  #define USB_DEVICE_ID_CODEMERCS_IOW_FIRST	0x1500
-#define USB_DEVICE_ID_CODEMERCS_IOW_LAST	0x15ff

  #define USB_VENDOR_ID_DELORME		0x1163
  #define USB_DEVICE_ID_DELORME_EARTHMATE 0x0100
@@ -949,6 +948,10 @@ static const struct hid_blacklist {

  	{ USB_VENDOR_ID_CIDC, 0x0103, 0xffff, HID_QUIRK_IGNORE },

+	{ USB_VENDOR_ID_WACOM, 0x0000, 0x0000, HID_QUIRK_IGNORE },
+
+        { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW_FIRST, 0xff00, HID_QUIRK_IGNORE },
+
  	{ 0, 0 }
  };

@@ -1174,15 +1177,6 @@ static struct hid_device *usb_hid_config
  	int n, len, insize = 0;
  	struct usbhid_device *usbhid;

-	/* Ignore all Wacom devices */
-	if (le16_to_cpu(dev->descriptor.idVendor) == USB_VENDOR_ID_WACOM)
-		return NULL;
-	/* ignore all Code Mercenaries IOWarrior devices */
-	if (le16_to_cpu(dev->descriptor.idVendor) == USB_VENDOR_ID_CODEMERCS)
-		if (le16_to_cpu(dev->descriptor.idProduct) >= USB_DEVICE_ID_CODEMERCS_IOW_FIRST &&
-		    le16_to_cpu(dev->descriptor.idProduct) <= USB_DEVICE_ID_CODEMERCS_IOW_LAST)
-			return NULL;
-
  	quirks = lookup_quirk(le16_to_cpu(dev->descriptor.idVendor),
  			      le16_to_cpu(dev->descriptor.idProduct));

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-03-19  4:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-19  4:21 [PATCH 3/7] usbhid: convert Wacom and Codemercs quirks to list entries Paul Walmsley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).