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
356356 struct cp2112_force_read_report report;
357357 int ret;
358358
359+ if (size > sizeof(dev->read_data))
360+ size = sizeof(dev->read_data);
359361 report.report = CP2112_DATA_READ_FORCE_SEND;
360362 report.length = cpu_to_be16(size);
361363
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
778778 /*
779779 * some egalax touchscreens have "application == HID_DG_TOUCHSCREEN"
780780 * 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.
781784 */
782785 if (field->physical == HID_DG_STYLUS)
783786 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;
784791
785792 if (field->application == HID_DG_TOUCHSCREEN ||
786793 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
8787 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOUSE_C05A, HID_QUIRK_ALWAYS_POLL },
8888 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOUSE_C06A, HID_QUIRK_ALWAYS_POLL },
8989 { 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 },
9093 { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3, HID_QUIRK_NO_INIT_REPORTS },
9194 { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3_JP, HID_QUIRK_NO_INIT_REPORTS },
9295 { 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
12711271 pad_input_dev = NULL;
12721272 wacom_wac->pad_registered = false;
12731273 fail_register_pad_input:
1274− input_unregister_device(touch_input_dev);
1274+ if (touch_input_dev)
1275+ input_unregister_device(touch_input_dev);
12751276 wacom_wac->touch_input = NULL;
12761277 wacom_wac->touch_registered = false;
12771278 fail_register_touch_input:
1278− input_unregister_device(pen_input_dev);
1279+ if (pen_input_dev)
1280+ input_unregister_device(pen_input_dev);
12791281 wacom_wac->pen_input = NULL;
12801282 wacom_wac->pen_registered = false;
12811283 fail_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
22132213 features->x_max = 4096;
22142214 features->y_max = 4096;
22152215 }
2216+ else if (features->pktlen == WACOM_PKGLEN_BBTOUCH) {
2217+ features->device_type |= WACOM_DEVICETYPE_PAD;
2218+ }
22162219 }
22172220
22182221 /*

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