aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-input.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r--drivers/hid/hid-input.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 9fa7239ab310..be2c7a8ad254 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -76,13 +76,15 @@ static const struct {
76 __s32 y; 76 __s32 y;
77} hid_hat_to_axis[] = {{ 0, 0}, { 0,-1}, { 1,-1}, { 1, 0}, { 1, 1}, { 0, 1}, {-1, 1}, {-1, 0}, {-1,-1}}; 77} hid_hat_to_axis[] = {{ 0, 0}, { 0,-1}, { 1,-1}, { 1, 0}, { 1, 1}, { 0, 1}, {-1, 1}, {-1, 0}, {-1,-1}};
78 78
79#define map_abs(c) do { usage->code = c; usage->type = EV_ABS; bit = input->absbit; max = ABS_MAX; } while (0) 79#define map_abs(c) hid_map_usage(hidinput, usage, &bit, &max, EV_ABS, (c))
80#define map_rel(c) do { usage->code = c; usage->type = EV_REL; bit = input->relbit; max = REL_MAX; } while (0) 80#define map_rel(c) hid_map_usage(hidinput, usage, &bit, &max, EV_REL, (c))
81#define map_key(c) do { usage->code = c; usage->type = EV_KEY; bit = input->keybit; max = KEY_MAX; } while (0) 81#define map_key(c) hid_map_usage(hidinput, usage, &bit, &max, EV_KEY, (c))
82#define map_led(c) do { usage->code = c; usage->type = EV_LED; bit = input->ledbit; max = LED_MAX; } while (0) 82#define map_led(c) hid_map_usage(hidinput, usage, &bit, &max, EV_LED, (c))
83 83
84#define map_abs_clear(c) do { map_abs(c); clear_bit(c, bit); } while (0) 84#define map_abs_clear(c) hid_map_usage_clear(hidinput, usage, &bit, \
85#define map_key_clear(c) do { map_key(c); clear_bit(c, bit); } while (0) 85 &max, EV_ABS, (c))
86#define map_key_clear(c) hid_map_usage_clear(hidinput, usage, &bit, \
87 &max, EV_KEY, (c))
86 88
87#ifdef CONFIG_USB_HIDINPUT_POWERBOOK 89#ifdef CONFIG_USB_HIDINPUT_POWERBOOK
88 90
@@ -386,7 +388,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
386 } 388 }
387 389
388 /* handle input mappings for quirky devices */ 390 /* handle input mappings for quirky devices */
389 ret = hidinput_mapping_quirks(usage, input, &bit, &max); 391 ret = hidinput_mapping_quirks(usage, hidinput, &bit, &max);
390 if (ret) 392 if (ret)
391 goto mapped; 393 goto mapped;
392 394