aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2008-10-30 18:58:51 -0400
committerJiri Kosina <jkosina@suse.cz>2009-01-03 19:00:50 -0500
commit08ef08ee8c5a8d538ca9a3c433d4213c128af863 (patch)
tree99726465fd5973d748ad7fd1521c512754443f84 /drivers/hid/usbhid
parentefc7ce18d9037aa947c1aad5eb712ecc47520126 (diff)
HID: automatically call usbhid_set_leds in usbhid driver
This patch (as1146c) makes usbhid automatically call usbhid_set_leds() for any device that supports the keyboard boot protocol. In theory this should be perfectly safe. BIOSes send the LED output report as part of their normal device initialization, so any keyboard device supporting the boot protocol has to be able to handle it. As a side effect, the hid-dell and hid-bright drivers are no longer needed, and the Logitech keyboard driver can be removed from hid-lg. CC: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/usbhid')
-rw-r--r--drivers/hid/usbhid/hid-core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 2afc8617f591..6383145b5840 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -874,6 +874,15 @@ static int usbhid_start(struct hid_device *hid)
874 874
875 set_bit(HID_STARTED, &usbhid->iofl); 875 set_bit(HID_STARTED, &usbhid->iofl);
876 876
877 /* Some keyboards don't work until their LEDs have been set.
878 * Since BIOSes do set the LEDs, it must be safe for any device
879 * that supports the keyboard boot protocol.
880 */
881 if (interface->desc.bInterfaceSubClass == USB_INTERFACE_SUBCLASS_BOOT &&
882 interface->desc.bInterfaceProtocol ==
883 USB_INTERFACE_PROTOCOL_KEYBOARD)
884 usbhid_set_leds(hid);
885
877 return 0; 886 return 0;
878 887
879fail: 888fail: