]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
HID: bring back possibility to specify vid/pid ignore on module load
authorJiri Kosina <jkosina@suse.cz>
Wed, 28 Jan 2009 23:15:51 +0000 (00:15 +0100)
committerJiri Kosina <jkosina@suse.cz>
Mon, 30 Mar 2009 13:12:52 +0000 (15:12 +0200)
When hid quirks were converted to specialized driver, the HID_QUIRK_IGNORE
has been moved completely, as the hid_ignore_list[] has been moved into the
generic code.

However userspace already got used to the possibility that modprobing
usbhid with

'quirks=vid:pid:0x4'

makes the device ignored by usbhid driver. So keep this quirk flag in place
for backwards compatibility.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/usbhid/hid-core.c
include/linux/hid.h

index f0a0f72238aba24c66c8ecaab0ca917064609add..eed05a3017e52881ceabf4a2a590a52c2703de69 100644 (file)
@@ -711,6 +711,9 @@ static int usbhid_parse(struct hid_device *hid)
        quirks = usbhid_lookup_quirk(le16_to_cpu(dev->descriptor.idVendor),
                        le16_to_cpu(dev->descriptor.idProduct));
 
+       if (quirks & HID_QUIRK_IGNORE)
+               return -ENODEV;
+
        /* Many keyboards and mice don't like to be polled for reports,
         * so we will always set the HID_QUIRK_NOGET flag for them. */
        if (interface->desc.bInterfaceSubClass == USB_INTERFACE_SUBCLASS_BOOT) {
index fa8ee9cef7bec3e228f27304bb31e14d161c0673..a46cda4886950a1adf78f4a071291ae848725e40 100644 (file)
@@ -270,6 +270,7 @@ struct hid_item {
 
 #define HID_QUIRK_INVERT                       0x00000001
 #define HID_QUIRK_NOTOUCH                      0x00000002
+#define HID_QUIRK_IGNORE                       0x00000004
 #define HID_QUIRK_NOGET                                0x00000008
 #define HID_QUIRK_BADPAD                       0x00000020
 #define HID_QUIRK_MULTI_INPUT                  0x00000040