Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: fix compilation of hidbp drivers without usbhid

We can use the blacklist only if usbhid code is compiled.

Reported-by: jurriaan <thunder7@xs4all.nl>
Cc: Pascal Terjan <pterjan@mandriva.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

+4
+2
drivers/hid/usbhid/usbkbd.c
··· 235 235 if (!usb_endpoint_is_int_in(endpoint)) 236 236 return -ENODEV; 237 237 238 + #ifdef CONFIG_USB_HID 238 239 if (usbhid_lookup_quirk(le16_to_cpu(dev->descriptor.idVendor), 239 240 le16_to_cpu(dev->descriptor.idProduct)) 240 241 & HID_QUIRK_IGNORE) { 241 242 return -ENODEV; 242 243 } 244 + #endif 243 245 244 246 pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress); 245 247 maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
+2
drivers/hid/usbhid/usbmouse.c
··· 131 131 if (!usb_endpoint_is_int_in(endpoint)) 132 132 return -ENODEV; 133 133 134 + #ifdef CONFIG_USB_HID 134 135 if (usbhid_lookup_quirk(le16_to_cpu(dev->descriptor.idVendor), 135 136 le16_to_cpu(dev->descriptor.idProduct)) 136 137 & (HID_QUIRK_IGNORE|HID_QUIRK_IGNORE_MOUSE)) { 137 138 return -ENODEV; 138 139 } 140 + #endif 139 141 140 142 pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress); 141 143 maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));