aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-18 19:52:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-18 19:52:31 -0400
commitc6b9e73f2fee8bb86058f296de808b326473456b (patch)
treee2f71a4f3aa209afac3009ffe9de2985ad477fe3 /drivers/hid
parent441f4058a04b2943685ff94e0f5f1992b0b3649e (diff)
parente639ba481b76e445df354acd6e29d859a9b1657f (diff)
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
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-core.c1
-rw-r--r--drivers/hid/hid-debug.c6
-rw-r--r--drivers/hid/hid-ids.h1
-rw-r--r--drivers/hid/hid-magicmouse.c7
-rw-r--r--drivers/hid/hid-ntrig.c11
-rw-r--r--drivers/hid/hid-tmff.c2
-rw-r--r--drivers/hid/usbhid/hid-quirks.c1
7 files changed, 24 insertions, 5 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 368fbb0c4ca6..2e2aa759d230 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1357,6 +1357,7 @@ static const struct hid_device_id hid_blacklist[] = {
1357 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb323) }, 1357 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb323) },
1358 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb324) }, 1358 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb324) },
1359 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651) }, 1359 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651) },
1360 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb653) },
1360 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654) }, 1361 { 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_TOPSEED, USB_DEVICE_ID_TOPSEED_CYBERLINK) },
1362 { HID_USB_DEVICE(USB_VENDOR_ID_TWINHAN, USB_DEVICE_ID_TWINHAN_IR_REMOTE) }, 1363 { HID_USB_DEVICE(USB_VENDOR_ID_TWINHAN, USB_DEVICE_ID_TWINHAN_IR_REMOTE) },
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index cd4ece6fdfb9..0c4e75573186 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -564,10 +564,10 @@ void hid_debug_event(struct hid_device *hdev, char *buf)
564 struct hid_debug_list *list; 564 struct hid_debug_list *list;
565 565
566 list_for_each_entry(list, &hdev->debug_list, node) { 566 list_for_each_entry(list, &hdev->debug_list, node) {
567 for (i = 0; i <= strlen(buf); i++) 567 for (i = 0; i < strlen(buf); i++)
568 list->hid_debug_buf[(list->tail + i) % (HID_DEBUG_BUFSIZE - 1)] = 568 list->hid_debug_buf[(list->tail + i) % HID_DEBUG_BUFSIZE] =
569 buf[i]; 569 buf[i];
570 list->tail = (list->tail + i) % (HID_DEBUG_BUFSIZE - 1); 570 list->tail = (list->tail + i) % HID_DEBUG_BUFSIZE;
571 } 571 }
572} 572}
573EXPORT_SYMBOL_GPL(hid_debug_event); 573EXPORT_SYMBOL_GPL(hid_debug_event);
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 72c05f90553c..797e06470356 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -445,6 +445,7 @@
445 445
446#define USB_VENDOR_ID_UCLOGIC 0x5543 446#define USB_VENDOR_ID_UCLOGIC 0x5543
447#define USB_DEVICE_ID_UCLOGIC_TABLET_PF1209 0x0042 447#define USB_DEVICE_ID_UCLOGIC_TABLET_PF1209 0x0042
448#define USB_DEVICE_ID_UCLOGIC_TABLET_WP4030U 0x0003
448 449
449#define USB_VENDOR_ID_VERNIER 0x08f7 450#define USB_VENDOR_ID_VERNIER 0x08f7
450#define USB_DEVICE_ID_VERNIER_LABPRO 0x0001 451#define USB_DEVICE_ID_VERNIER_LABPRO 0x0001
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index 4a3a94f2b10c..c174b64c3810 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -353,7 +353,7 @@ static int magicmouse_probe(struct hid_device *hdev,
353 goto err_free; 353 goto err_free;
354 } 354 }
355 355
356 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); 356 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_HIDINPUT);
357 if (ret) { 357 if (ret) {
358 dev_err(&hdev->dev, "magicmouse hw start failed\n"); 358 dev_err(&hdev->dev, "magicmouse hw start failed\n");
359 goto err_free; 359 goto err_free;
@@ -409,8 +409,11 @@ err_free:
409 409
410static void magicmouse_remove(struct hid_device *hdev) 410static void magicmouse_remove(struct hid_device *hdev)
411{ 411{
412 struct magicmouse_sc *msc = hid_get_drvdata(hdev);
413
412 hid_hw_stop(hdev); 414 hid_hw_stop(hdev);
413 kfree(hid_get_drvdata(hdev)); 415 input_unregister_device(msc->input);
416 kfree(msc);
414} 417}
415 418
416static const struct hid_device_id magic_mice[] = { 419static const struct hid_device_id magic_mice[] = {
diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c
index 3234c729a895..edcc0c4247bb 100644
--- a/drivers/hid/hid-ntrig.c
+++ b/drivers/hid/hid-ntrig.c
@@ -140,6 +140,9 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
140 nd->reading_mt = 1; 140 nd->reading_mt = 1;
141 nd->first_contact_confidence = 0; 141 nd->first_contact_confidence = 0;
142 break; 142 break;
143 case HID_DG_TIPSWITCH:
144 /* Prevent emission of touch until validated */
145 return 1;
143 case HID_DG_CONFIDENCE: 146 case HID_DG_CONFIDENCE:
144 nd->confidence = value; 147 nd->confidence = value;
145 break; 148 break;
@@ -259,6 +262,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
259 BTN_TOOL_TRIPLETAP, 0); 262 BTN_TOOL_TRIPLETAP, 0);
260 input_report_key(input, 263 input_report_key(input,
261 BTN_TOOL_QUADTAP, 0); 264 BTN_TOOL_QUADTAP, 0);
265 input_report_key(input, BTN_TOUCH, 0);
262 } 266 }
263 break; 267 break;
264 268
@@ -308,13 +312,20 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
308 312
309 313
310 list_for_each_entry(hidinput, &hdev->inputs, list) { 314 list_for_each_entry(hidinput, &hdev->inputs, list) {
315 if (hidinput->report->maxfield < 1)
316 continue;
317
311 input = hidinput->input; 318 input = hidinput->input;
312 switch (hidinput->report->field[0]->application) { 319 switch (hidinput->report->field[0]->application) {
313 case HID_DG_PEN: 320 case HID_DG_PEN:
314 input->name = "N-Trig Pen"; 321 input->name = "N-Trig Pen";
315 break; 322 break;
316 case HID_DG_TOUCHSCREEN: 323 case HID_DG_TOUCHSCREEN:
324 /* These keys are redundant for fingers, clear them
325 * to prevent incorrect identification */
317 __clear_bit(BTN_TOOL_PEN, input->keybit); 326 __clear_bit(BTN_TOOL_PEN, input->keybit);
327 __clear_bit(BTN_TOOL_FINGER, input->keybit);
328 __clear_bit(BTN_0, input->keybit);
318 /* 329 /*
319 * A little something special to enable 330 * A little something special to enable
320 * two and three finger taps. 331 * two and three finger taps.
diff --git a/drivers/hid/hid-tmff.c b/drivers/hid/hid-tmff.c
index 167ea746fb9c..c32f32c84ac8 100644
--- a/drivers/hid/hid-tmff.c
+++ b/drivers/hid/hid-tmff.c
@@ -251,6 +251,8 @@ static const struct hid_device_id tm_devices[] = {
251 .driver_data = (unsigned long)ff_rumble }, 251 .driver_data = (unsigned long)ff_rumble },
252 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651), /* FGT Rumble Force Wheel */ 252 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651), /* FGT Rumble Force Wheel */
253 .driver_data = (unsigned long)ff_rumble }, 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 },
254 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654), /* FGT Force Feedback Wheel */ 256 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654), /* FGT Force Feedback Wheel */
255 .driver_data = (unsigned long)ff_joystick }, 257 .driver_data = (unsigned long)ff_joystick },
256 { } 258 { }
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index 7844280897d1..928943c7ce9a 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -63,6 +63,7 @@ static const struct hid_blacklist {
63 { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET }, 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 }, 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 }, 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 },
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_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 { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
68 69