linux/debian/patches/features/all/wacom/0028-wacom-leave-touch_max-...

38 lines
1.2 KiB
Diff

From: Ping Cheng <pinglinux@gmail.com>
Date: Sun, 24 Jun 2012 23:00:29 -0500
Subject: wacom: leave touch_max as is if predefined
Bug-Debian: http://bugs.debian.org/677164
Another fixup to f393ee2b814e (Input: wacom - retrieve maximum number
of touch points, 2012-04-29). The 0xE6 tablet in the Thinkpad x220t
reports the wrong value for MAXCONTACTS so the hardcoded value must
take precedence.
[jn: extracted from a larger commit in the input-wacom repository,
with new description]
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 6b1cd71ba320..8b31473a81fe 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -401,7 +401,9 @@ static int wacom_parse_hid(struct usb_interface *intf,
break;
case HID_USAGE_CONTACTMAX:
- wacom_retrieve_report_data(intf, features);
+ /* leave touch_max as is if predefined */
+ if (!features->touch_max)
+ wacom_retrieve_report_data(intf, features);
i++;
break;
}
--
1.7.11.rc3