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

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: avoid '\0' in hid debugfs events file
HID: Add RGT Clutch Wheel clutch device id
HID: ntrig: fix touch events
HID: add quirk for UC-Logik WP4030 tablet
HID: magicmouse: fix oops after device removal

+24 -5
+1
drivers/hid/hid-core.c
··· 1357 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb323) }, 1358 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb324) }, 1359 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651) }, 1360 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654) }, 1361 { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED, USB_DEVICE_ID_TOPSEED_CYBERLINK) }, 1362 { HID_USB_DEVICE(USB_VENDOR_ID_TWINHAN, USB_DEVICE_ID_TWINHAN_IR_REMOTE) },
··· 1357 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb323) }, 1358 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb324) }, 1359 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651) }, 1360 + { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb653) }, 1361 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654) }, 1362 { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED, USB_DEVICE_ID_TOPSEED_CYBERLINK) }, 1363 { HID_USB_DEVICE(USB_VENDOR_ID_TWINHAN, USB_DEVICE_ID_TWINHAN_IR_REMOTE) },
+3 -3
drivers/hid/hid-debug.c
··· 564 struct hid_debug_list *list; 565 566 list_for_each_entry(list, &hdev->debug_list, node) { 567 - for (i = 0; i <= strlen(buf); i++) 568 - list->hid_debug_buf[(list->tail + i) % (HID_DEBUG_BUFSIZE - 1)] = 569 buf[i]; 570 - list->tail = (list->tail + i) % (HID_DEBUG_BUFSIZE - 1); 571 } 572 } 573 EXPORT_SYMBOL_GPL(hid_debug_event);
··· 564 struct hid_debug_list *list; 565 566 list_for_each_entry(list, &hdev->debug_list, node) { 567 + for (i = 0; i < strlen(buf); i++) 568 + list->hid_debug_buf[(list->tail + i) % HID_DEBUG_BUFSIZE] = 569 buf[i]; 570 + list->tail = (list->tail + i) % HID_DEBUG_BUFSIZE; 571 } 572 } 573 EXPORT_SYMBOL_GPL(hid_debug_event);
+1
drivers/hid/hid-ids.h
··· 445 446 #define USB_VENDOR_ID_UCLOGIC 0x5543 447 #define USB_DEVICE_ID_UCLOGIC_TABLET_PF1209 0x0042 448 449 #define USB_VENDOR_ID_VERNIER 0x08f7 450 #define USB_DEVICE_ID_VERNIER_LABPRO 0x0001
··· 445 446 #define USB_VENDOR_ID_UCLOGIC 0x5543 447 #define USB_DEVICE_ID_UCLOGIC_TABLET_PF1209 0x0042 448 + #define USB_DEVICE_ID_UCLOGIC_TABLET_WP4030U 0x0003 449 450 #define USB_VENDOR_ID_VERNIER 0x08f7 451 #define USB_DEVICE_ID_VERNIER_LABPRO 0x0001
+5 -2
drivers/hid/hid-magicmouse.c
··· 353 goto err_free; 354 } 355 356 - ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); 357 if (ret) { 358 dev_err(&hdev->dev, "magicmouse hw start failed\n"); 359 goto err_free; ··· 409 410 static void magicmouse_remove(struct hid_device *hdev) 411 { 412 hid_hw_stop(hdev); 413 - kfree(hid_get_drvdata(hdev)); 414 } 415 416 static const struct hid_device_id magic_mice[] = {
··· 353 goto err_free; 354 } 355 356 + ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_HIDINPUT); 357 if (ret) { 358 dev_err(&hdev->dev, "magicmouse hw start failed\n"); 359 goto err_free; ··· 409 410 static void magicmouse_remove(struct hid_device *hdev) 411 { 412 + struct magicmouse_sc *msc = hid_get_drvdata(hdev); 413 + 414 hid_hw_stop(hdev); 415 + input_unregister_device(msc->input); 416 + kfree(msc); 417 } 418 419 static const struct hid_device_id magic_mice[] = {
+11
drivers/hid/hid-ntrig.c
··· 140 nd->reading_mt = 1; 141 nd->first_contact_confidence = 0; 142 break; 143 case HID_DG_CONFIDENCE: 144 nd->confidence = value; 145 break; ··· 262 BTN_TOOL_TRIPLETAP, 0); 263 input_report_key(input, 264 BTN_TOOL_QUADTAP, 0); 265 } 266 break; 267 ··· 312 313 314 list_for_each_entry(hidinput, &hdev->inputs, list) { 315 input = hidinput->input; 316 switch (hidinput->report->field[0]->application) { 317 case HID_DG_PEN: 318 input->name = "N-Trig Pen"; 319 break; 320 case HID_DG_TOUCHSCREEN: 321 __clear_bit(BTN_TOOL_PEN, input->keybit); 322 /* 323 * A little something special to enable 324 * two and three finger taps.
··· 140 nd->reading_mt = 1; 141 nd->first_contact_confidence = 0; 142 break; 143 + case HID_DG_TIPSWITCH: 144 + /* Prevent emission of touch until validated */ 145 + return 1; 146 case HID_DG_CONFIDENCE: 147 nd->confidence = value; 148 break; ··· 259 BTN_TOOL_TRIPLETAP, 0); 260 input_report_key(input, 261 BTN_TOOL_QUADTAP, 0); 262 + input_report_key(input, BTN_TOUCH, 0); 263 } 264 break; 265 ··· 308 309 310 list_for_each_entry(hidinput, &hdev->inputs, list) { 311 + if (hidinput->report->maxfield < 1) 312 + continue; 313 + 314 input = hidinput->input; 315 switch (hidinput->report->field[0]->application) { 316 case HID_DG_PEN: 317 input->name = "N-Trig Pen"; 318 break; 319 case HID_DG_TOUCHSCREEN: 320 + /* These keys are redundant for fingers, clear them 321 + * to prevent incorrect identification */ 322 __clear_bit(BTN_TOOL_PEN, input->keybit); 323 + __clear_bit(BTN_TOOL_FINGER, input->keybit); 324 + __clear_bit(BTN_0, input->keybit); 325 /* 326 * A little something special to enable 327 * two and three finger taps.
+2
drivers/hid/hid-tmff.c
··· 251 .driver_data = (unsigned long)ff_rumble }, 252 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651), /* FGT Rumble Force Wheel */ 253 .driver_data = (unsigned long)ff_rumble }, 254 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654), /* FGT Force Feedback Wheel */ 255 .driver_data = (unsigned long)ff_joystick }, 256 { }
··· 251 .driver_data = (unsigned long)ff_rumble }, 252 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651), /* FGT Rumble Force Wheel */ 253 .driver_data = (unsigned long)ff_rumble }, 254 + { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb653), /* RGT Force Feedback CLUTCH Raging Wheel */ 255 + .driver_data = (unsigned long)ff_joystick }, 256 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654), /* FGT Force Feedback Wheel */ 257 .driver_data = (unsigned long)ff_joystick }, 258 { }
+1
drivers/hid/usbhid/hid-quirks.c
··· 63 { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET }, 64 { USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_KEYBOARD, HID_QUIRK_NOGET }, 65 { USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_PF1209, HID_QUIRK_MULTI_INPUT }, 66 { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT | HID_QUIRK_SKIP_OUTPUT_REPORTS }, 67 { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, 68
··· 63 { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET }, 64 { USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_KEYBOARD, HID_QUIRK_NOGET }, 65 { USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_PF1209, HID_QUIRK_MULTI_INPUT }, 66 + { USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP4030U, HID_QUIRK_MULTI_INPUT }, 67 { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT | HID_QUIRK_SKIP_OUTPUT_REPORTS }, 68 { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, 69