From: Ingo Ruhnke Date: Mon, 29 Oct 2012 13:29:30 +0000 (+0100) Subject: HID: fix incorrect handling of devices with high button count X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~36^2^7~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8e86d054686d9090549476ea2394aa04c614a93;p=pandora-kernel.git HID: fix incorrect handling of devices with high button count Button names for USB gamepads are currently assigned incorrectly, as the evdev code assigned to buttons is "BTN_GAMEPAD + code", which on devices with more then 16 buttons bleeds over into button names reserved for graphic tablets (BTN_TOOL_PEN, etc.). This causes problems further down the line as the device are now no longer detected as joystick. This patch fixes that by assigning buttons outside the range to BTN_TRIGGER_HAPPY (as is already the case for USB joysticks). Furthermore this patch corrects the assignment to BTN_TRIGGER_HAPPY, as currently the first button over 16 is assigned to BTN_TRIGGER_HAPPY17 (i.e. BTN_TRIGGER_HAPPY+0x10) not BTN_TRIGGER_HAPPY. Signed-off-by: Ingo Ruhnke Acked-by: Dmitry Torokhov Signed-off-by: Jiri Kosina --- Reading git-diff-tree failed