3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ping Cheng <pingli...@gmail.com>

commit 1d0d6df02750b4a6f466768cbfbf860e24f4c8d4 upstream.

Old single touch Tablet PCs do not have touch_max set at
wacom_features. Since touch device at lease supports one
finger, assign touch_max to 1 when touch usage is defined
in its HID Descriptor and touch_max is not pre-defined.

Tested-by: Jason Gerecke <killert...@gmail.com>
Signed-off-by: Ping Cheng <pi...@wacom.com>
Reviewed-by: Chris Bagwell <ch...@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dmitry.torok...@gmail.com>
Cc: Josh Boyer <jwbo...@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

---
 drivers/input/tablet/wacom_sys.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -339,7 +339,7 @@ static int wacom_parse_hid(struct usb_in
        struct usb_device *dev = interface_to_usbdev(intf);
        char limit = 0;
        /* result has to be defined as int for some devices */
-       int result = 0;
+       int result = 0, touch_max = 0;
        int i = 0, usage = WCM_UNDEFINED, finger = 0, pen = 0;
        unsigned char *report;
 
@@ -386,7 +386,8 @@ static int wacom_parse_hid(struct usb_in
                                if (usage == WCM_DESKTOP) {
                                        if (finger) {
                                                features->device_type = 
BTN_TOOL_FINGER;
-
+                                               /* touch device at least 
supports one touch point */
+                                               touch_max = 1;
                                                switch (features->type) {
                                                case TABLETPC2FG:
                                                        features->pktlen = 
WACOM_PKGLEN_TPC2FG;
@@ -539,6 +540,8 @@ static int wacom_parse_hid(struct usb_in
        }
 
  out:
+       if (!features->touch_max && touch_max)
+               features->touch_max = touch_max;
        result = 0;
        kfree(report);
        return result;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to