>From 6771256d8fe7540e747fe45a4b3529c5466c09b7 Mon Sep 17 00:00:00 2001 From: Oliver Neukum <oliver@xxxxxxxxxx> Date: Thu, 11 Mar 2010 15:00:40 +0100 Subject: [PATCH 2/5] USB: usbtouch: Implement reset_resume() In reset_resume() redo model specific init and then do a resume Signed-off-by: Oliver Neukum <neukum@xxxxxxxxxxxxx> --- drivers/input/touchscreen/usbtouchscreen.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 6db0a03..8836761 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c @@ -1310,6 +1310,26 @@ static int usbtouch_resume(struct usb_interface *intf) return rv; } +static int usbtouch_reset_resume(struct usb_interface *intf) +{ + struct usbtouch_usb *usbtouch = usb_get_intfdata(intf); + int rv; + + /* device specific init */ + if (usbtouch->type->init) { + rv = usbtouch->type->init(usbtouch); + if (rv) { + dbg("%s - type->init() failed, err: %d", __func__, rv); + goto err_out; + } + } + + rv = usbtouch_resume(intf); + +err_out: + return rv; +} + static void usbtouch_free_buffers(struct usb_device *udev, struct usbtouch_usb *usbtouch) { @@ -1501,6 +1521,7 @@ static struct usb_driver usbtouch_driver = { .disconnect = usbtouch_disconnect, .suspend = usbtouch_suspend, .resume = usbtouch_resume, + .reset_resume = usbtouch_reset_resume, .id_table = usbtouch_devices, }; -- 1.6.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html