]> git.baikalelectronics.ru Git - kernel.git/commit
HID: check for HID_QUIRK_IGNORE during probing
authorJindrich Makovicka <makovick@gmail.com>
Thu, 3 Jun 2010 10:50:42 +0000 (12:50 +0200)
committerJiri Kosina <jkosina@suse.cz>
Fri, 4 Jun 2010 09:19:02 +0000 (11:19 +0200)
commit92dc44f2cb5cd0c6a0f3f7724e752f4b2e175c20
treeb1f2c82237aee7a2790b40d104261ab967e2fb4e
parent17fa7b6d089d2449fb8d415f51887c673031c33b
HID: check for HID_QUIRK_IGNORE during probing

While the hardcoded ignore list is checked in hid_add_device(), the
user supplied ignore flags are not. Thus, the IGNORE quirk (0x0004)
cannot be used to stop usbhid from binding devices like iBuddy, which
has been recently removed from the ignore list due to product ID
conflict.

This patch adds the user quirk check to hid_add_device(), and makes
hid_add_device() return -ENODEV when HID_QUIRK_IGNORE bit is set.

HID_QUIRK_NO_IGNORE still takes precedence over HID_QUIRK_IGNORE.

With the patch, iBuddy works properly using libusb when the following
option is added to modprobe.d:

options usbhid quirks=0x1130:0x0002:0x0004

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c