Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
torvalds committed Mar 18, 2010
2 parents 441f405 + e639ba4 commit c6b9e73
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 5 deletions.
1 change: 1 addition & 0 deletions drivers/hid/hid-core.c
Expand Up @@ -1357,6 +1357,7 @@ static const struct hid_device_id hid_blacklist[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb323) },
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb324) },
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651) },
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb653) },
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654) },
{ HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED, USB_DEVICE_ID_TOPSEED_CYBERLINK) },
{ HID_USB_DEVICE(USB_VENDOR_ID_TWINHAN, USB_DEVICE_ID_TWINHAN_IR_REMOTE) },
Expand Down
6 changes: 3 additions & 3 deletions drivers/hid/hid-debug.c
Expand Up @@ -564,10 +564,10 @@ void hid_debug_event(struct hid_device *hdev, char *buf)
struct hid_debug_list *list;

list_for_each_entry(list, &hdev->debug_list, node) {
for (i = 0; i <= strlen(buf); i++)
list->hid_debug_buf[(list->tail + i) % (HID_DEBUG_BUFSIZE - 1)] =
for (i = 0; i < strlen(buf); i++)
list->hid_debug_buf[(list->tail + i) % HID_DEBUG_BUFSIZE] =
buf[i];
list->tail = (list->tail + i) % (HID_DEBUG_BUFSIZE - 1);
list->tail = (list->tail + i) % HID_DEBUG_BUFSIZE;
}
}
EXPORT_SYMBOL_GPL(hid_debug_event);
Expand Down
1 change: 1 addition & 0 deletions drivers/hid/hid-ids.h
Expand Up @@ -445,6 +445,7 @@

#define USB_VENDOR_ID_UCLOGIC 0x5543
#define USB_DEVICE_ID_UCLOGIC_TABLET_PF1209 0x0042
#define USB_DEVICE_ID_UCLOGIC_TABLET_WP4030U 0x0003

#define USB_VENDOR_ID_VERNIER 0x08f7
#define USB_DEVICE_ID_VERNIER_LABPRO 0x0001
Expand Down
7 changes: 5 additions & 2 deletions drivers/hid/hid-magicmouse.c
Expand Up @@ -353,7 +353,7 @@ static int magicmouse_probe(struct hid_device *hdev,
goto err_free;
}

ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_HIDINPUT);
if (ret) {
dev_err(&hdev->dev, "magicmouse hw start failed\n");
goto err_free;
Expand Down Expand Up @@ -409,8 +409,11 @@ static int magicmouse_probe(struct hid_device *hdev,

static void magicmouse_remove(struct hid_device *hdev)
{
struct magicmouse_sc *msc = hid_get_drvdata(hdev);

hid_hw_stop(hdev);
kfree(hid_get_drvdata(hdev));
input_unregister_device(msc->input);
kfree(msc);
}

static const struct hid_device_id magic_mice[] = {
Expand Down
11 changes: 11 additions & 0 deletions drivers/hid/hid-ntrig.c
Expand Up @@ -140,6 +140,9 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
nd->reading_mt = 1;
nd->first_contact_confidence = 0;
break;
case HID_DG_TIPSWITCH:
/* Prevent emission of touch until validated */
return 1;
case HID_DG_CONFIDENCE:
nd->confidence = value;
break;
Expand Down Expand Up @@ -259,6 +262,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
BTN_TOOL_TRIPLETAP, 0);
input_report_key(input,
BTN_TOOL_QUADTAP, 0);
input_report_key(input, BTN_TOUCH, 0);
}
break;

Expand Down Expand Up @@ -308,13 +312,20 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)


list_for_each_entry(hidinput, &hdev->inputs, list) {
if (hidinput->report->maxfield < 1)
continue;

input = hidinput->input;
switch (hidinput->report->field[0]->application) {
case HID_DG_PEN:
input->name = "N-Trig Pen";
break;
case HID_DG_TOUCHSCREEN:
/* These keys are redundant for fingers, clear them
* to prevent incorrect identification */
__clear_bit(BTN_TOOL_PEN, input->keybit);
__clear_bit(BTN_TOOL_FINGER, input->keybit);
__clear_bit(BTN_0, input->keybit);
/*
* A little something special to enable
* two and three finger taps.
Expand Down
2 changes: 2 additions & 0 deletions drivers/hid/hid-tmff.c
Expand Up @@ -251,6 +251,8 @@ static const struct hid_device_id tm_devices[] = {
.driver_data = (unsigned long)ff_rumble },
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651), /* FGT Rumble Force Wheel */
.driver_data = (unsigned long)ff_rumble },
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb653), /* RGT Force Feedback CLUTCH Raging Wheel */
.driver_data = (unsigned long)ff_joystick },
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654), /* FGT Force Feedback Wheel */
.driver_data = (unsigned long)ff_joystick },
{ }
Expand Down
1 change: 1 addition & 0 deletions drivers/hid/usbhid/hid-quirks.c
Expand Up @@ -63,6 +63,7 @@ static const struct hid_blacklist {
{ USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET },
{ USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_KEYBOARD, HID_QUIRK_NOGET },
{ USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_PF1209, HID_QUIRK_MULTI_INPUT },
{ USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP4030U, HID_QUIRK_MULTI_INPUT },
{ USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT | HID_QUIRK_SKIP_OUTPUT_REPORTS },
{ USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },

Expand Down

0 comments on commit c6b9e73

Please sign in to comment.