diff options
author | Oliver Neukum <oliver@neukum.org> | 2009-07-02 05:44:33 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-23 09:46:28 -0400 |
commit | a4708103adeaf5731c329b37b0a2b397f814c55c (patch) | |
tree | 24c3fb1c0f54058eed87dd3cbff2e690d7313e15 | |
parent | 86286883fc8218c81cc1deb04cd1b4a8464bba6f (diff) |
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>
-rw-r--r-- | 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 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) | |||
1087 | kref_put(&data->kref, usbtmc_delete); | 1087 | kref_put(&data->kref, usbtmc_delete); |
1088 | } | 1088 | } |
1089 | 1089 | ||
1090 | static int usbtmc_suspend (struct usb_interface *intf, pm_message_t message) | ||
1091 | { | ||
1092 | /* this driver does not have pending URBs */ | ||
1093 | return 0; | ||
1094 | } | ||
1095 | |||
1096 | static int usbtmc_resume (struct usb_interface *intf) | ||
1097 | { | ||
1098 | return 0; | ||
1099 | } | ||
1100 | |||
1090 | static struct usb_driver usbtmc_driver = { | 1101 | static struct usb_driver usbtmc_driver = { |
1091 | .name = "usbtmc", | 1102 | .name = "usbtmc", |
1092 | .id_table = usbtmc_devices, | 1103 | .id_table = usbtmc_devices, |
1093 | .probe = usbtmc_probe, | 1104 | .probe = usbtmc_probe, |
1094 | .disconnect = usbtmc_disconnect | 1105 | .disconnect = usbtmc_disconnect, |
1106 | .suspend = usbtmc_suspend, | ||
1107 | .resume = usbtmc_resume, | ||
1095 | }; | 1108 | }; |
1096 | 1109 | ||
1097 | static int __init usbtmc_init(void) | 1110 | static int __init usbtmc_init(void) |