Commit c1d7b7c1 authored by Martin Kepplinger's avatar Martin Kepplinger Committed by Dmitry Torokhov

Input: pegasus_notetaker - set device mode in reset_resume() if in use

Signed-off-by: default avatarMartin Kepplinger <martink@posteo.de>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent f32f5394
...@@ -410,7 +410,19 @@ static int pegasus_resume(struct usb_interface *intf) ...@@ -410,7 +410,19 @@ static int pegasus_resume(struct usb_interface *intf)
static int pegasus_reset_resume(struct usb_interface *intf) static int pegasus_reset_resume(struct usb_interface *intf)
{ {
return pegasus_resume(intf); struct pegasus *pegasus = usb_get_intfdata(intf);
int retval = 0;
mutex_lock(&pegasus->dev->mutex);
if (pegasus->dev->users) {
retval = pegasus_set_mode(pegasus, PEN_MODE_XY,
NOTETAKER_LED_MOUSE);
if (!retval && usb_submit_urb(pegasus->irq, GFP_NOIO) < 0)
retval = -EIO;
}
mutex_unlock(&pegasus->dev->mutex);
return retval;
} }
static const struct usb_device_id pegasus_ids[] = { static const struct usb_device_id pegasus_ids[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment