From 8e6b677b1fcdcc0ffc14193ce5d5067abab3d4f4 Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Wed, 14 Nov 2012 16:59:18 +0100 Subject: [PATCH] --- yaml --- r: 343079 b: refs/heads/master c: afbcb04c181f36634f4af207bb0c9cc46b7405e4 h: refs/heads/master i: 343077: ee1af8e988ce514ebcabde73ec13ae1840110cb7 343075: 414c05825dda8ba7460ba7d66463f464abdc3bf8 343071: 0f338e7d92b436932400ebab27e96ca7c837f17b v: v3 --- [refs] | 2 +- trunk/drivers/hid/hid-multitouch.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 702f9f62c1bf..ac880a1b4a2c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 54f4c0c3e9d9ad50bf58a4f7c2bbdfb3fa4ab3a7 +refs/heads/master: afbcb04c181f36634f4af207bb0c9cc46b7405e4 diff --git a/trunk/drivers/hid/hid-multitouch.c b/trunk/drivers/hid/hid-multitouch.c index 3d2e6bbb0046..9c7415ff4aaf 100644 --- a/trunk/drivers/hid/hid-multitouch.c +++ b/trunk/drivers/hid/hid-multitouch.c @@ -121,6 +121,7 @@ struct mt_device { #define MT_CLS_GENERALTOUCH_PWT_TENFINGERS 0x0109 #define MT_DEFAULT_MAXCONTACT 10 +#define MT_MAX_MAXCONTACT 250 #define MT_USB_DEVICE(v, p) HID_DEVICE(BUS_USB, HID_GROUP_MULTITOUCH, v, p) #define MT_BT_DEVICE(v, p) HID_DEVICE(BUS_BLUETOOTH, HID_GROUP_MULTITOUCH, v, p) @@ -282,6 +283,9 @@ static void mt_feature_mapping(struct hid_device *hdev, case HID_DG_CONTACTMAX: td->maxcontact_report_id = field->report->id; td->maxcontacts = field->value[0]; + if (!td->maxcontacts && + field->logical_maximum <= MT_MAX_MAXCONTACT) + td->maxcontacts = field->logical_maximum; if (td->mtclass.maxcontacts) /* check if the maxcontacts is given by the class */ td->maxcontacts = td->mtclass.maxcontacts;