summaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet
diff options
context:
space:
mode:
authorMartin Kepplinger <martink@posteo.de>2016-07-19 14:31:12 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2016-07-19 14:33:07 -0700
commitc1d7b7c1817aceaa93e5f255fc0ea23f327bcd40 (patch)
tree74115facc248073116bb75b5d24a39797f5c26c1 /drivers/input/tablet
parentf32f5394415adcb93245213b50ab739e31c31b5b (diff)
downloadlinux-stable-c1d7b7c1817aceaa93e5f255fc0ea23f327bcd40.tar.gz
linux-stable-c1d7b7c1817aceaa93e5f255fc0ea23f327bcd40.tar.bz2
linux-stable-c1d7b7c1817aceaa93e5f255fc0ea23f327bcd40.zip
Input: pegasus_notetaker - set device mode in reset_resume() if in use
Signed-off-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/tablet')
-rw-r--r--drivers/input/tablet/pegasus_notetaker.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/input/tablet/pegasus_notetaker.c b/drivers/input/tablet/pegasus_notetaker.c
index 17770df37628..949dacc78664 100644
--- a/drivers/input/tablet/pegasus_notetaker.c
+++ b/drivers/input/tablet/pegasus_notetaker.c
@@ -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[] = {