Skip to content

Commit

Permalink
Input: wacom - switch mode upon system resume
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ping Cheng authored and Dmitry Torokhov committed Apr 14, 2010
1 parent afb567e commit 3810147
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions drivers/input/tablet/wacom_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3810147

Please sign in to comment.