diff options
author | Ping Cheng <pingc@wacom.com> | 2010-04-14 02:07:52 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-26 10:47:54 -0400 |
commit | e58bcaf0556d4507abab778f1a919e45d4d5639a (patch) | |
tree | dc32b1bac8c2627248349d7708e99eae81fa9259 | |
parent | 9c84e4813a02a219d61f61967d7058f2d8037d88 (diff) |
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>
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 072f33b3b2b0..e53ddc5d0fa1 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) | |||
644 | int rv; | 644 | int rv; |
645 | 645 | ||
646 | mutex_lock(&wacom->lock); | 646 | mutex_lock(&wacom->lock); |
647 | if (wacom->open) { | 647 | |
648 | /* switch to wacom mode first */ | ||
649 | wacom_query_tablet_data(intf, features); | ||
650 | |||
651 | if (wacom->open) | ||
648 | rv = usb_submit_urb(wacom->irq, GFP_NOIO); | 652 | rv = usb_submit_urb(wacom->irq, GFP_NOIO); |
649 | /* switch to wacom mode if needed */ | 653 | else |
650 | if (!wacom_retrieve_hid_descriptor(intf, features)) | ||
651 | wacom_query_tablet_data(intf, features); | ||
652 | } else | ||
653 | rv = 0; | 654 | rv = 0; |
655 | |||
654 | mutex_unlock(&wacom->lock); | 656 | mutex_unlock(&wacom->lock); |
655 | 657 | ||
656 | return rv; | 658 | return rv; |