Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202211
b: refs/heads/master
c: ed4299e
h: refs/heads/master
i:
  202209: 4dceb60
  202207: 93ea7ff
v: v3
  • Loading branch information
Oliver Neukum authored and Dmitry Torokhov committed Jul 15, 2010
1 parent d8ede20 commit 89e2064
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4cf51c383d7a8d472a6090a0d19c371d40e823c9
refs/heads/master: ed4299e1b173f111ac0c40d6617e47fbff02b52f
25 changes: 25 additions & 0 deletions trunk/drivers/input/touchscreen/usbtouchscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1296,6 +1296,29 @@ static void usbtouch_close(struct input_dev *input)
usb_kill_urb(usbtouch->irq);
}

static int usbtouch_suspend
(struct usb_interface *intf, pm_message_t message)
{
struct usbtouch_usb *usbtouch = usb_get_intfdata(intf);

usb_kill_urb(usbtouch->irq);

return 0;
}

static int usbtouch_resume(struct usb_interface *intf)
{
struct usbtouch_usb *usbtouch = usb_get_intfdata(intf);
struct input_dev *input = usbtouch->input;
int result = 0;

mutex_lock(&input->mutex);
if (input->users || usbtouch->type->irq_always)
result = usb_submit_urb(usbtouch->irq, GFP_NOIO);
mutex_unlock(&input->mutex);

return result;
}

static void usbtouch_free_buffers(struct usb_device *udev,
struct usbtouch_usb *usbtouch)
Expand Down Expand Up @@ -1486,6 +1509,8 @@ static struct usb_driver usbtouch_driver = {
.name = "usbtouchscreen",
.probe = usbtouch_probe,
.disconnect = usbtouch_disconnect,
.suspend = usbtouch_suspend,
.resume = usbtouch_resume,
.id_table = usbtouch_devices,
};

Expand Down

0 comments on commit 89e2064

Please sign in to comment.