Input: wacom - don't retrieve touch_max when it is predefined
authorPing Cheng <pinglinux@gmail.com>
Thu, 28 Jun 2012 23:47:30 +0000 (16:47 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 29 Jun 2012 00:02:45 +0000 (17:02 -0700)
Some models, such as 0xE6, report more fingers than we process.

Reported-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Tested-by: Nils Kanning <nils@kanning.de>
Tested-by: Rafi Rubin <rafi@seas.upenn.edu>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/tablet/wacom_sys.c

index 23a933da75cdcc50dd505a75d5dd201cfffbf676..b145841bdbe7daddbc8eb3745e94839434e978d4 100644 (file)
@@ -398,7 +398,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;
                        }