History

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

Pull HID fixes from Jiri Kosina: - kernel crash fixes for multitouch and wacom drivers, by Brent Adam and Dan Carpenter - cp2112 data packet race condition corruption fix, by Antonio Borneo - a few new device IDs for wacom and microsoft drivers * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: cp2112: fix to force single data-report reply HID: wacom: Enable pad device for older Bamboo Touch tablets HID: multitouch: Fix fields from pen report ID being interpreted for multitouch HID: microsoft: Add quirk for MS Surface Type/Touch cover HID: wacom: NULL dereferences on error in probe()

Linus Torvalds committed 11 years ago

Commit 874bf9e2 parents 077b205 6debce65 files · +19 −2Browse files

Unified · Split

5 files
  1. drivers/hid/hid-cp2112.c +2 −0
  2. drivers/hid/hid-multitouch.c +7 −0
  3. drivers/hid/usbhid/hid-quirks.c +3 −0
  4. drivers/hid/wacom_sys.c +4 −2
  5. drivers/hid/wacom_wac.c +3 −0
drivers/hid/hid-cp2112.c+2−0
@@ -356,6 +356,8 @@ static int cp2112_read(struct cp2112_device *dev, u8 *data, size_t size) · 355 unmodified lines
356 struct cp2112_force_read_report report;356 struct cp2112_force_read_report report;
357 int ret;357 int ret;
358 358
359 if (size > sizeof(dev->read_data))
360 size = sizeof(dev->read_data);
359 report.report = CP2112_DATA_READ_FORCE_SEND;361 report.report = CP2112_DATA_READ_FORCE_SEND;
360 report.length = cpu_to_be16(size);362 report.length = cpu_to_be16(size);
361 363
drivers/hid/hid-multitouch.c+7−0
@@ -778,9 +778,16 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi, · 777 unmodified lines
778 /*778 /*
779 * some egalax touchscreens have "application == HID_DG_TOUCHSCREEN"779 * some egalax touchscreens have "application == HID_DG_TOUCHSCREEN"
780 * for the stylus.780 * for the stylus.
781 * The check for mt_report_id ensures we don't process
782 * HID_DG_CONTACTCOUNT from the pen report as it is outside the physical
783 * collection, but within the report ID.
781 */784 */
782 if (field->physical == HID_DG_STYLUS)785 if (field->physical == HID_DG_STYLUS)
783 return 0;786 return 0;
787 else if ((field->physical == 0) &&
788 (field->report->id != td->mt_report_id) &&
789 (td->mt_report_id != -1))
790 return 0;
784 791
785 if (field->application == HID_DG_TOUCHSCREEN ||792 if (field->application == HID_DG_TOUCHSCREEN ||
786 field->application == HID_DG_TOUCHPAD)793 field->application == HID_DG_TOUCHPAD)
drivers/hid/usbhid/hid-quirks.c+3−0
@@ -87,6 +87,9 @@ static const struct hid_blacklist { · 86 unmodified lines
87 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOUSE_C05A, HID_QUIRK_ALWAYS_POLL },87 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOUSE_C05A, HID_QUIRK_ALWAYS_POLL },
88 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOUSE_C06A, HID_QUIRK_ALWAYS_POLL },88 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOUSE_C06A, HID_QUIRK_ALWAYS_POLL },
89 { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_NOGET },89 { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_NOGET },
90 { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_SURFACE_PRO_2, HID_QUIRK_NO_INIT_REPORTS },
91 { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_2, HID_QUIRK_NO_INIT_REPORTS },
92 { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TOUCH_COVER_2, HID_QUIRK_NO_INIT_REPORTS },
90 { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3, HID_QUIRK_NO_INIT_REPORTS },93 { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3, HID_QUIRK_NO_INIT_REPORTS },
91 { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3_JP, HID_QUIRK_NO_INIT_REPORTS },94 { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3_JP, HID_QUIRK_NO_INIT_REPORTS },
92 { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER, HID_QUIRK_NO_INIT_REPORTS },95 { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER, HID_QUIRK_NO_INIT_REPORTS },
drivers/hid/wacom_sys.c+4−2
@@ -1271,11 +1271,13 @@ fail_leds: · 1270 unmodified lines
1271 pad_input_dev = NULL;1271 pad_input_dev = NULL;
1272 wacom_wac->pad_registered = false;1272 wacom_wac->pad_registered = false;
1273fail_register_pad_input:1273fail_register_pad_input:
1274 input_unregister_device(touch_input_dev);1274 if (touch_input_dev)
1275 input_unregister_device(touch_input_dev);
1275 wacom_wac->touch_input = NULL;1276 wacom_wac->touch_input = NULL;
1276 wacom_wac->touch_registered = false;1277 wacom_wac->touch_registered = false;
1277fail_register_touch_input:1278fail_register_touch_input:
1278 input_unregister_device(pen_input_dev);1279 if (pen_input_dev)
1280 input_unregister_device(pen_input_dev);
1279 wacom_wac->pen_input = NULL;1281 wacom_wac->pen_input = NULL;
1280 wacom_wac->pen_registered = false;1282 wacom_wac->pen_registered = false;
1281fail_register_pen_input:1283fail_register_pen_input:
drivers/hid/wacom_wac.c+3−0
@@ -2213,6 +2213,9 @@ void wacom_setup_device_quirks(struct wacom *wacom) · 2212 unmodified lines
2213 features->x_max = 4096;2213 features->x_max = 4096;
2214 features->y_max = 4096;2214 features->y_max = 4096;
2215 }2215 }
2216 else if (features->pktlen == WACOM_PKGLEN_BBTOUCH) {
2217 features->device_type |= WACOM_DEVICETYPE_PAD;
2218 }
2216 }2219 }
2217 2220
2218 /*2221 /*

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t