mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
Input: wacom - switch mode upon system resume
commit 014f61504a 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.
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ea50da76fa
commit
4186c4e6eb
@@ -562,11 +562,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);
|
||||
|
||||
if (wacom->open)
|
||||
rv = usb_submit_urb(wacom->irq, GFP_NOIO);
|
||||
wacom_query_tablet_data(intf);
|
||||
} else
|
||||
else
|
||||
rv = 0;
|
||||
|
||||
mutex_unlock(&wacom->lock);
|
||||
|
||||
return rv;
|
||||
|
||||
Reference in New Issue
Block a user