Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 014f6150 authored by Ping Cheng's avatar Ping Cheng Committed by Dmitry Torokhov
Browse files

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.

Reported-and-tested-by: default avatarAnton Anikin <Anton@Anikin.name>
Signed-off-by: default avatarPing Cheng <pingc@wacom.com>
Cc: stable@kernel.org
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent afb567e3
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -673,13 +673,15 @@ static int wacom_resume(struct usb_interface *intf)
	int rv;

	mutex_lock(&wacom->lock);
	if (wacom->open) {
		rv = usb_submit_urb(wacom->irq, GFP_NOIO);
		/* switch to wacom mode if needed */
		if (!wacom_retrieve_hid_descriptor(intf, features))

	/* switch to wacom mode first */
	wacom_query_tablet_data(intf, features);
	} else

	if (wacom->open)
		rv = usb_submit_urb(wacom->irq, GFP_NOIO);
	else
		rv = 0;

	mutex_unlock(&wacom->lock);

	return rv;