Message ID | 20150930084557.GE1551@lahna.fi.intel.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Jiri Kosina |
Headers | show |
On Wed, 30 Sep 2015, Mika Westerberg wrote: > > I would be in favor of applying the patch in its current shape, but if > > Jiri thinks we need a little bit more caution here, we would need to add > > a test regarding the Win8 capability here. > > What about adding following on top of this patch? It checks the device > in question belongs to "win8 class". > > I can send a new version of the patch if this seems reasonable. If this actually maintains the backwards compatibility for that particular device Benjamin mentioned (no idea what mtclass does it have?), I'd be in favor of doing that. Thanks,
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index d9ca2b96ab68..72c55a3f650f 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -311,6 +311,7 @@ static struct attribute_group mt_attribute_group = { static void mt_get_feature(struct hid_device *hdev, struct hid_report *report) { + struct mt_device *td = hid_get_drvdata(hdev); int ret, size = hid_report_len(report); u8 *buf; @@ -319,7 +320,8 @@ static void mt_get_feature(struct hid_device *hdev, struct hid_report *report) * been retrieved. Currently this is only done for Windows 8 touch * devices. */ - if (!(hdev->quirks & HID_QUIRK_NO_INIT_REPORTS)) + if (!(hdev->quirks & HID_QUIRK_NO_INIT_REPORTS) || + td->mtclass.name != MT_CLS_WIN_8) return; buf = hid_alloc_report_buf(report, GFP_KERNEL);