summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorPing Cheng <pingc@wacom.com>2010-04-13 23:07:52 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-04-13 23:14:31 -0700
commit38101475f937c5dc0baf43a9e0c7613dbeb94d5a (patch)
treea3d386045a91d9cd1f446637c2901bd2a16634c4 /drivers/input
parentafb567e3fdd2ee43b243cb4f6fe772ab921b2ada (diff)
Input: wacom - switch mode upon system resume
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. Signed-off-by: Ping Cheng <pingc@wacom.com> Reported-and-tested-by: Anton Anikin <Anton@Anikin.name> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-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 8b5d2873f0c4..f46502589e4e 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -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;