提交 a4708103 编写于 作者: O Oliver Neukum 提交者: Greg Kroah-Hartman

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: NOliver Neukum <oliver@neukum.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 86286883
...@@ -1087,11 +1087,24 @@ static void usbtmc_disconnect(struct usb_interface *intf) ...@@ -1087,11 +1087,24 @@ static void usbtmc_disconnect(struct usb_interface *intf)
kref_put(&data->kref, usbtmc_delete); 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 = { static struct usb_driver usbtmc_driver = {
.name = "usbtmc", .name = "usbtmc",
.id_table = usbtmc_devices, .id_table = usbtmc_devices,
.probe = usbtmc_probe, .probe = usbtmc_probe,
.disconnect = usbtmc_disconnect .disconnect = usbtmc_disconnect,
.suspend = usbtmc_suspend,
.resume = usbtmc_resume,
}; };
static int __init usbtmc_init(void) static int __init usbtmc_init(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册