Hello.
Greg Kroah-Hartman wrote:
From: Oliver Neukum <oliver@xxxxxxxxxx>
a class driver should have suspend/resume. This makes sure we
don't see a virtual disconnect unnecessarily.
Signed-off-by: Oliver Neukum <oliver@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
drivers/usb/class/usbtmc.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 0c9df97..4f0858f 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -1087,11 +1087,24 @@ static void usbtmc_disconnect(struct usb_interface *intf)
kref_put(&data->kref, usbtmc_delete);
}
+static int usbtmc_suspend (struct usb_interface *intf, pm_message_t message)
+{
+ /* this driver does not have pending URBs */
+ return 0;
+}
+
+static int usbtmc_resume (struct usb_interface *intf)
This wouldn't have passed checkpatch.pl BTW -- due to spaces between
function names and parens. :-)
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html