提交 d39c9400 编写于 作者: L Linus Torvalds

Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid:
  HID: Fix DRIVER_DESC macro
  HID: mousepoll parameter makes no sense for generic HID
  HID: tiny patch to remove a kmalloc cast
  HID: fix mappings for DiNovo Edge Keyboard - Logitech USB BT receiver
...@@ -40,17 +40,9 @@ ...@@ -40,17 +40,9 @@
#define DRIVER_VERSION "v2.6" #define DRIVER_VERSION "v2.6"
#define DRIVER_AUTHOR "Andreas Gal, Vojtech Pavlik" #define DRIVER_AUTHOR "Andreas Gal, Vojtech Pavlik"
#define DRIVER_DESC "USB HID core driver" #define DRIVER_DESC "HID core driver"
#define DRIVER_LICENSE "GPL" #define DRIVER_LICENSE "GPL"
/*
* Module parameters.
*/
static unsigned int hid_mousepoll_interval;
module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644);
MODULE_PARM_DESC(mousepoll, "Polling interval of mice");
/* /*
* Register a new report for a device. * Register a new report for a device.
*/ */
...@@ -656,7 +648,7 @@ struct hid_device *hid_parse_report(__u8 *start, unsigned size) ...@@ -656,7 +648,7 @@ struct hid_device *hid_parse_report(__u8 *start, unsigned size)
for (i = 0; i < HID_REPORT_TYPES; i++) for (i = 0; i < HID_REPORT_TYPES; i++)
INIT_LIST_HEAD(&device->report_enum[i].report_list); INIT_LIST_HEAD(&device->report_enum[i].report_list);
if (!(device->rdesc = (__u8 *)kmalloc(size, GFP_KERNEL))) { if (!(device->rdesc = kmalloc(size, GFP_KERNEL))) {
kfree(device->collection); kfree(device->collection);
kfree(device); kfree(device);
return NULL; return NULL;
......
...@@ -68,6 +68,7 @@ static const struct { ...@@ -68,6 +68,7 @@ static const struct {
#define map_led(c) do { usage->code = c; usage->type = EV_LED; bit = input->ledbit; max = LED_MAX; } while (0) #define map_led(c) do { usage->code = c; usage->type = EV_LED; bit = input->ledbit; max = LED_MAX; } while (0)
#define map_abs_clear(c) do { map_abs(c); clear_bit(c, bit); } while (0) #define map_abs_clear(c) do { map_abs(c); clear_bit(c, bit); } while (0)
#define map_rel_clear(c) do { map_rel(c); clear_bit(c, bit); } while (0)
#define map_key_clear(c) do { map_key(c); clear_bit(c, bit); } while (0) #define map_key_clear(c) do { map_key(c); clear_bit(c, bit); } while (0)
#ifdef CONFIG_USB_HIDINPUT_POWERBOOK #ifdef CONFIG_USB_HIDINPUT_POWERBOOK
...@@ -292,7 +293,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel ...@@ -292,7 +293,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
} }
} }
map_key(code); map_key_clear(code);
break; break;
...@@ -343,9 +344,9 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel ...@@ -343,9 +344,9 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
case HID_GD_RX: case HID_GD_RY: case HID_GD_RZ: case HID_GD_RX: case HID_GD_RY: case HID_GD_RZ:
case HID_GD_SLIDER: case HID_GD_DIAL: case HID_GD_WHEEL: case HID_GD_SLIDER: case HID_GD_DIAL: case HID_GD_WHEEL:
if (field->flags & HID_MAIN_ITEM_RELATIVE) if (field->flags & HID_MAIN_ITEM_RELATIVE)
map_rel(usage->hid & 0xf); map_rel_clear(usage->hid & 0xf);
else else
map_abs(usage->hid & 0xf); map_abs_clear(usage->hid & 0xf);
break; break;
case HID_GD_HATSWITCH: case HID_GD_HATSWITCH:
...@@ -500,7 +501,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel ...@@ -500,7 +501,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
case 0x22f: map_key_clear(KEY_ZOOMRESET); break; case 0x22f: map_key_clear(KEY_ZOOMRESET); break;
case 0x233: map_key_clear(KEY_SCROLLUP); break; case 0x233: map_key_clear(KEY_SCROLLUP); break;
case 0x234: map_key_clear(KEY_SCROLLDOWN); break; case 0x234: map_key_clear(KEY_SCROLLDOWN); break;
case 0x238: map_rel(REL_HWHEEL); break; case 0x238: map_rel_clear(REL_HWHEEL); break;
case 0x25f: map_key_clear(KEY_CANCEL); break; case 0x25f: map_key_clear(KEY_CANCEL); break;
case 0x279: map_key_clear(KEY_REDO); break; case 0x279: map_key_clear(KEY_REDO); break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册