summaryrefslogtreecommitdiffstats
path: root/drivers/usb/class
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2009-07-02 11:44:33 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-23 06:46:28 -0700
commita4708103adeaf5731c329b37b0a2b397f814c55c (patch)
tree24c3fb1c0f54058eed87dd3cbff2e690d7313e15 /drivers/usb/class
parent86286883fc8218c81cc1deb04cd1b4a8464bba6f (diff)
downloadblackbird-op-linux-a4708103adeaf5731c329b37b0a2b397f814c55c.tar.gz
blackbird-op-linux-a4708103adeaf5731c329b37b0a2b397f814c55c.zip
USB: suspend/resume support for usbtmc
a class driver should have suspend/resume. This makes sure we don't see a virtual disconnect unnecessarily. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r--drivers/usb/class/usbtmc.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 0c9df97f6775..4f0858fbf980 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)
+{
+ return 0;
+}
+
static struct usb_driver usbtmc_driver = {
.name = "usbtmc",
.id_table = usbtmc_devices,
.probe = usbtmc_probe,
- .disconnect = usbtmc_disconnect
+ .disconnect = usbtmc_disconnect,
+ .suspend = usbtmc_suspend,
+ .resume = usbtmc_resume,
};
static int __init usbtmc_init(void)
OpenPOWER on IntegriCloud