提交 c1d7b7c1 编写于 作者: M Martin Kepplinger 提交者: Dmitry Torokhov

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

Signed-off-by: NMartin Kepplinger <martink@posteo.de>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 f32f5394
......@@ -410,7 +410,19 @@ static int pegasus_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[] = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册