diff options
-rw-r--r-- | drivers/hid/hid-core.c | 12 | ||||
-rw-r--r-- | drivers/hid/hid-input.c | 9 |
2 files changed, 7 insertions, 14 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 18c2b3cf6bcc..1e1a7770a6b9 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -40,18 +40,10 @@ | |||
40 | 40 | ||
41 | #define DRIVER_VERSION "v2.6" | 41 | #define DRIVER_VERSION "v2.6" |
42 | #define DRIVER_AUTHOR "Andreas Gal, Vojtech Pavlik" | 42 | #define DRIVER_AUTHOR "Andreas Gal, Vojtech Pavlik" |
43 | #define DRIVER_DESC "USB HID core driver" | 43 | #define DRIVER_DESC "HID core driver" |
44 | #define DRIVER_LICENSE "GPL" | 44 | #define DRIVER_LICENSE "GPL" |
45 | 45 | ||
46 | /* | 46 | /* |
47 | * Module parameters. | ||
48 | */ | ||
49 | |||
50 | static unsigned int hid_mousepoll_interval; | ||
51 | module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644); | ||
52 | MODULE_PARM_DESC(mousepoll, "Polling interval of mice"); | ||
53 | |||
54 | /* | ||
55 | * Register a new report for a device. | 47 | * Register a new report for a device. |
56 | */ | 48 | */ |
57 | 49 | ||
@@ -656,7 +648,7 @@ struct hid_device *hid_parse_report(__u8 *start, unsigned size) | |||
656 | for (i = 0; i < HID_REPORT_TYPES; i++) | 648 | for (i = 0; i < HID_REPORT_TYPES; i++) |
657 | INIT_LIST_HEAD(&device->report_enum[i].report_list); | 649 | INIT_LIST_HEAD(&device->report_enum[i].report_list); |
658 | 650 | ||
659 | if (!(device->rdesc = (__u8 *)kmalloc(size, GFP_KERNEL))) { | 651 | if (!(device->rdesc = kmalloc(size, GFP_KERNEL))) { |
660 | kfree(device->collection); | 652 | kfree(device->collection); |
661 | kfree(device); | 653 | kfree(device); |
662 | return NULL; | 654 | return NULL; |
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 998638020ea0..28689e3eb552 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -68,6 +68,7 @@ static const struct { | |||
68 | #define map_led(c) do { usage->code = c; usage->type = EV_LED; bit = input->ledbit; max = LED_MAX; } while (0) | 68 | #define map_led(c) do { usage->code = c; usage->type = EV_LED; bit = input->ledbit; max = LED_MAX; } while (0) |
69 | 69 | ||
70 | #define map_abs_clear(c) do { map_abs(c); clear_bit(c, bit); } while (0) | 70 | #define map_abs_clear(c) do { map_abs(c); clear_bit(c, bit); } while (0) |
71 | #define map_rel_clear(c) do { map_rel(c); clear_bit(c, bit); } while (0) | ||
71 | #define map_key_clear(c) do { map_key(c); clear_bit(c, bit); } while (0) | 72 | #define map_key_clear(c) do { map_key(c); clear_bit(c, bit); } while (0) |
72 | 73 | ||
73 | #ifdef CONFIG_USB_HIDINPUT_POWERBOOK | 74 | #ifdef CONFIG_USB_HIDINPUT_POWERBOOK |
@@ -292,7 +293,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
292 | } | 293 | } |
293 | } | 294 | } |
294 | 295 | ||
295 | map_key(code); | 296 | map_key_clear(code); |
296 | break; | 297 | break; |
297 | 298 | ||
298 | 299 | ||
@@ -343,9 +344,9 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
343 | case HID_GD_RX: case HID_GD_RY: case HID_GD_RZ: | 344 | case HID_GD_RX: case HID_GD_RY: case HID_GD_RZ: |
344 | case HID_GD_SLIDER: case HID_GD_DIAL: case HID_GD_WHEEL: | 345 | case HID_GD_SLIDER: case HID_GD_DIAL: case HID_GD_WHEEL: |
345 | if (field->flags & HID_MAIN_ITEM_RELATIVE) | 346 | if (field->flags & HID_MAIN_ITEM_RELATIVE) |
346 | map_rel(usage->hid & 0xf); | 347 | map_rel_clear(usage->hid & 0xf); |
347 | else | 348 | else |
348 | map_abs(usage->hid & 0xf); | 349 | map_abs_clear(usage->hid & 0xf); |
349 | break; | 350 | break; |
350 | 351 | ||
351 | case HID_GD_HATSWITCH: | 352 | case HID_GD_HATSWITCH: |
@@ -500,7 +501,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
500 | case 0x22f: map_key_clear(KEY_ZOOMRESET); break; | 501 | case 0x22f: map_key_clear(KEY_ZOOMRESET); break; |
501 | case 0x233: map_key_clear(KEY_SCROLLUP); break; | 502 | case 0x233: map_key_clear(KEY_SCROLLUP); break; |
502 | case 0x234: map_key_clear(KEY_SCROLLDOWN); break; | 503 | case 0x234: map_key_clear(KEY_SCROLLDOWN); break; |
503 | case 0x238: map_rel(REL_HWHEEL); break; | 504 | case 0x238: map_rel_clear(REL_HWHEEL); break; |
504 | case 0x25f: map_key_clear(KEY_CANCEL); break; | 505 | case 0x25f: map_key_clear(KEY_CANCEL); break; |
505 | case 0x279: map_key_clear(KEY_REDO); break; | 506 | case 0x279: map_key_clear(KEY_REDO); break; |
506 | 507 | ||