aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fainelli <ffainelli@freebox.fr>2010-12-14 05:56:56 -0500
committerJiri Kosina <jkosina@suse.cz>2010-12-14 08:49:27 -0500
commit1874542d952bbea01997191aee868b472555fd9a (patch)
tree6596e60fe705750d68e560e216ece96dbb2d559a
parentc4ffafa51bb0bea648a4ca119033a95057799c9d (diff)
HID: replace offsets values with their corresponding BTN_* defines
Instead of using magic values, use their corresponding BTN_* defines from linux/input.h. Signed-off-by: Florian Fainelli <ffainelli@freebox.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--drivers/hid/hid-input.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index c0757821b1fc..e60fdb88101f 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -319,21 +319,21 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
319 319
320 switch (field->application) { 320 switch (field->application) {
321 case HID_GD_MOUSE: 321 case HID_GD_MOUSE:
322 case HID_GD_POINTER: code += 0x110; break; 322 case HID_GD_POINTER: code += BTN_MOUSE; break;
323 case HID_GD_JOYSTICK: 323 case HID_GD_JOYSTICK:
324 if (code <= 0xf) 324 if (code <= 0xf)
325 code += BTN_JOYSTICK; 325 code += BTN_JOYSTICK;
326 else 326 else
327 code += BTN_TRIGGER_HAPPY; 327 code += BTN_TRIGGER_HAPPY;
328 break; 328 break;
329 case HID_GD_GAMEPAD: code += 0x130; break; 329 case HID_GD_GAMEPAD: code += BTN_GAMEPAD; break;
330 default: 330 default:
331 switch (field->physical) { 331 switch (field->physical) {
332 case HID_GD_MOUSE: 332 case HID_GD_MOUSE:
333 case HID_GD_POINTER: code += 0x110; break; 333 case HID_GD_POINTER: code += BTN_MOUSE; break;
334 case HID_GD_JOYSTICK: code += 0x120; break; 334 case HID_GD_JOYSTICK: code += BTN_JOYSTICK; break;
335 case HID_GD_GAMEPAD: code += 0x130; break; 335 case HID_GD_GAMEPAD: code += BTN_GAMEPAD; break;
336 default: code += 0x100; 336 default: code += BTN_MISC;
337 } 337 }
338 } 338 }
339 339