summaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet
diff options
context:
space:
mode:
authorPing Cheng <pingc@wacom.com>2010-04-13 23:07:52 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-26 07:47:54 -0700
commite58bcaf0556d4507abab778f1a919e45d4d5639a (patch)
treedc32b1bac8c2627248349d7708e99eae81fa9259 /drivers/input/tablet
parent9c84e4813a02a219d61f61967d7058f2d8037d88 (diff)
downloadkernel-crypto-e58bcaf0556d4507abab778f1a919e45d4d5639a.tar.gz
kernel-crypto-e58bcaf0556d4507abab778f1a919e45d4d5639a.tar.xz
kernel-crypto-e58bcaf0556d4507abab778f1a919e45d4d5639a.zip
Input: wacom - switch mode upon system resume
commit 014f61504af276ba9d9544d8a7401d8f8526eb73 upstream. 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 <Anton@Anikin.name> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/input/tablet')
-rw-r--r--drivers/input/tablet/wacom_sys.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 072f33b3b2b..e53ddc5d0fa 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -644,13 +644,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;