diff options
| author | Martin Kepplinger <martink@posteo.de> | 2016-07-19 17:31:12 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-07-19 17:33:07 -0400 |
| commit | c1d7b7c1817aceaa93e5f255fc0ea23f327bcd40 (patch) | |
| tree | 74115facc248073116bb75b5d24a39797f5c26c1 /drivers/input/tablet | |
| parent | f32f5394415adcb93245213b50ab739e31c31b5b (diff) | |
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.c | 14 |
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) | |||
| 410 | 410 | ||
| 411 | static int pegasus_reset_resume(struct usb_interface *intf) | 411 | static int pegasus_reset_resume(struct usb_interface *intf) |
| 412 | { | 412 | { |
| 413 | return pegasus_resume(intf); | 413 | struct pegasus *pegasus = usb_get_intfdata(intf); |
| 414 | int retval = 0; | ||
| 415 | |||
| 416 | mutex_lock(&pegasus->dev->mutex); | ||
| 417 | if (pegasus->dev->users) { | ||
| 418 | retval = pegasus_set_mode(pegasus, PEN_MODE_XY, | ||
| 419 | NOTETAKER_LED_MOUSE); | ||
| 420 | if (!retval && usb_submit_urb(pegasus->irq, GFP_NOIO) < 0) | ||
| 421 | retval = -EIO; | ||
| 422 | } | ||
| 423 | mutex_unlock(&pegasus->dev->mutex); | ||
| 424 | |||
| 425 | return retval; | ||
| 414 | } | 426 | } |
| 415 | 427 | ||
| 416 | static const struct usb_device_id pegasus_ids[] = { | 428 | static const struct usb_device_id pegasus_ids[] = { |
