aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-input.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-01-22 12:23:23 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-01-22 12:23:23 -0500
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 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: