summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-input.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-01-22 09:23:23 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-01-22 09:23:23 -0800
commit0bf98542a07ee1341830dcc4be63df85645f76b9 (patch)
tree9945a92ea183d5d5c2989f5f12bc56d27920f3d2 /drivers/hid/hid-input.c
parentb4a2c87dada12010239b4d5f8f9bc0eb964a614f (diff)
parentd8c8a393166d6283003fb111d0b4a40931c0eda4 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: hid-core.c: Adds GTCO CalComp Interwrite IPanel PIDs to blacklist HID: put usb_interface instead of usb_device into hid->dev to fix udevinfo breakage HID: add missing RX, RZ and RY enum values to hid-debug output HID: hid/hid-input.c doesn't need to include linux/usb/input.h HID: compilation fix when DEBUG_DATA is defined HID: proper LED-mapping for SpaceNavigator HID: update MAINTAINERS entry for USB-HID HID: GEYSER4_ISO needs quirk HID: fix some ARM builds due to HID brokenness - make USB_HID depend on INPUT
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r--drivers/hid/hid-input.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 28689e3eb55..9cf591a1bda 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -30,7 +30,6 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/kernel.h>
-#include <linux/usb/input.h>
#undef DEBUG
@@ -364,9 +363,22 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
break;
case HID_UP_LED:
- if (((usage->hid - 1) & 0xffff) >= LED_MAX)
- goto ignore;
- map_led((usage->hid - 1) & 0xffff);
+
+ switch (usage->hid & 0xffff) { /* HID-Value: */
+ case 0x01: map_led (LED_NUML); break; /* "Num Lock" */
+ case 0x02: map_led (LED_CAPSL); break; /* "Caps Lock" */
+ case 0x03: map_led (LED_SCROLLL); break; /* "Scroll Lock" */
+ case 0x04: map_led (LED_COMPOSE); break; /* "Compose" */
+ case 0x05: map_led (LED_KANA); break; /* "Kana" */
+ case 0x27: map_led (LED_SLEEP); break; /* "Stand-By" */
+ case 0x4c: map_led (LED_SUSPEND); break; /* "System Suspend" */
+ case 0x09: map_led (LED_MUTE); break; /* "Mute" */
+ case 0x4b: map_led (LED_MISC); break; /* "Generic Indicator" */
+ case 0x19: map_led (LED_MAIL); break; /* "Message Waiting" */
+ case 0x4d: map_led (LED_CHARGING); break; /* "External Power Connected" */
+
+ default: goto ignore;
+ }
break;
case HID_UP_DIGITIZER: