diff options
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r-- | drivers/hid/hid-input.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 28689e3eb552..9cf591a1bda3 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
33 | #include <linux/usb/input.h> | ||
34 | 33 | ||
35 | #undef DEBUG | 34 | #undef DEBUG |
36 | 35 | ||
@@ -364,9 +363,22 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
364 | break; | 363 | break; |
365 | 364 | ||
366 | case HID_UP_LED: | 365 | case HID_UP_LED: |
367 | if (((usage->hid - 1) & 0xffff) >= LED_MAX) | 366 | |
368 | goto ignore; | 367 | switch (usage->hid & 0xffff) { /* HID-Value: */ |
369 | map_led((usage->hid - 1) & 0xffff); | 368 | case 0x01: map_led (LED_NUML); break; /* "Num Lock" */ |
369 | case 0x02: map_led (LED_CAPSL); break; /* "Caps Lock" */ | ||
370 | case 0x03: map_led (LED_SCROLLL); break; /* "Scroll Lock" */ | ||
371 | case 0x04: map_led (LED_COMPOSE); break; /* "Compose" */ | ||
372 | case 0x05: map_led (LED_KANA); break; /* "Kana" */ | ||
373 | case 0x27: map_led (LED_SLEEP); break; /* "Stand-By" */ | ||
374 | case 0x4c: map_led (LED_SUSPEND); break; /* "System Suspend" */ | ||
375 | case 0x09: map_led (LED_MUTE); break; /* "Mute" */ | ||
376 | case 0x4b: map_led (LED_MISC); break; /* "Generic Indicator" */ | ||
377 | case 0x19: map_led (LED_MAIL); break; /* "Message Waiting" */ | ||
378 | case 0x4d: map_led (LED_CHARGING); break; /* "External Power Connected" */ | ||
379 | |||
380 | default: goto ignore; | ||
381 | } | ||
370 | break; | 382 | break; |
371 | 383 | ||
372 | case HID_UP_DIGITIZER: | 384 | case HID_UP_DIGITIZER: |