linux/drivers/hid/usbhid
Guillaume Chazarain 8fe294caf8 HID: fix hiddev's use of usb_find_interface
My macbook infrared remote control was broken by commit
bd25f4dd69 ("HID: hiddev: use
usb_find_interface, get rid of BKL").

This device appears in dmesg as:
apple 0003:05AC:8242.0001: hiddev0,hidraw0: USB HID v1.11 Device
[Apple Computer, Inc. IR Receiver] on usb-0000:00:1d.2-1/input0

It stopped working as lircd was getting ENODEV when opening /dev/usb/hiddev0.

AFAICS hiddev_driver is a dummy driver so usb_find_interface(&hiddev_driver)
does not find anything.

The device is associated with the usbhid driver, so let's do
usb_find_interface(&hid_driver) instead.

$ ls -l /sys/devices/pci0000:00/0000:00:1d.2/usb7/7-1/7-1:1.0/usb/hiddev0/device/driver
lrwxrwxrwx 1 root root 0 2010-09-12 16:28 /sys/devices/pci0000:00/0000:00:1d.2/usb7/7-1/7-1:1.0/usb/hiddev0/device/driver -> ../../../../../../bus/usb/drivers/usbhid

Signed-off-by: Guillaume Chazarain <guichaz@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-09-14 10:58:42 +02:00
..
hid-core.c HID: fix hiddev's use of usb_find_interface 2010-09-14 10:58:42 +02:00
hid-pidff.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
hid-quirks.c HID: add no-get quirk for eGalax touch controller 2010-09-03 12:12:55 +02:00
hiddev.c HID: fix hiddev's use of usb_find_interface 2010-09-14 10:58:42 +02:00
Kconfig HID: make boot protocol drivers depend on EMBEDDED 2009-01-04 01:00:53 +01:00
Makefile HID: remove hid-ff 2008-10-14 23:51:01 +02:00
usbhid.h HID: fix hiddev's use of usb_find_interface 2010-09-14 10:58:42 +02:00
usbkbd.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2010-05-21 10:51:03 -07:00
usbmouse.c USB: rename usb_buffer_alloc() and usb_buffer_free() users 2010-05-20 13:21:38 -07:00