]> Git Repo - linux.git/commitdiff
Input: wacom - switch mode upon system resume
authorPing Cheng <[email protected]>
Wed, 14 Apr 2010 06:07:52 +0000 (23:07 -0700)
committerDmitry Torokhov <[email protected]>
Thu, 15 Apr 2010 18:16:10 +0000 (11:16 -0700)
When Wacom devices wake up from a sleep, the switch mode command
(wacom_query_tablet_data) is needed before wacom_open is called.
wacom_query_tablet_data should not be executed inside wacom_open
since wacom_open is called more than once during probe.

wacom_retrieve_hid_descriptor is removed from wacom_resume due
to the fact that the required descriptors are stored properly
upon system resume.

Reported-and-tested-by: Anton Anikin <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Cc: [email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
drivers/input/tablet/wacom_sys.c

index 8b5d2873f0c4d4f562b39c3cb929bbba635986ea..f46502589e4eaef0ef92eb0ee6d9a127ab714d83 100644 (file)
@@ -673,13 +673,15 @@ static int wacom_resume(struct usb_interface *intf)
        int rv;
 
        mutex_lock(&wacom->lock);
-       if (wacom->open) {
+
+       /* switch to wacom mode first */
+       wacom_query_tablet_data(intf, features);
+
+       if (wacom->open)
                rv = usb_submit_urb(wacom->irq, GFP_NOIO);
-               /* switch to wacom mode if needed */
-               if (!wacom_retrieve_hid_descriptor(intf, features))
-                       wacom_query_tablet_data(intf, features);
-       } else
+       else
                rv = 0;
+
        mutex_unlock(&wacom->lock);
 
        return rv;
This page took 0.060022 seconds and 4 git commands to generate.