Commit 7650cd96 authored by Elina Pasheva's avatar Elina Pasheva Committed by Greg Kroah-Hartman

USB: serial: sierra driver adding reset_resume function

This patch adds a new function to the sierra.c driver, sierra_reset_resume().
This new function completes the suite of Dynamic Power Management commands
in the sierra.c driver.
Signed-off-by: default avatarElina Pasheva <epasheva@sierrawireless.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>

 drivers/usb/serial/sierra.c |   30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)
parent 05197921
...@@ -304,16 +304,6 @@ static const struct usb_device_id id_table[] = { ...@@ -304,16 +304,6 @@ static const struct usb_device_id id_table[] = {
}; };
MODULE_DEVICE_TABLE(usb, id_table); MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver sierra_driver = {
.name = "sierra",
.probe = usb_serial_probe,
.disconnect = usb_serial_disconnect,
.suspend = usb_serial_suspend,
.resume = usb_serial_resume,
.id_table = id_table,
.no_dynamic_id = 1,
.supports_autosuspend = 1,
};
struct sierra_port_private { struct sierra_port_private {
spinlock_t lock; /* lock the structure */ spinlock_t lock; /* lock the structure */
...@@ -1061,11 +1051,31 @@ static int sierra_resume(struct usb_serial *serial) ...@@ -1061,11 +1051,31 @@ static int sierra_resume(struct usb_serial *serial)
return ec ? -EIO : 0; return ec ? -EIO : 0;
} }
static int sierra_reset_resume(struct usb_interface *intf)
{
struct usb_serial *serial = usb_get_intfdata(intf);
dev_err(&serial->dev->dev, "%s\n", __func__);
return usb_serial_resume(intf);
}
#else #else
#define sierra_suspend NULL #define sierra_suspend NULL
#define sierra_resume NULL #define sierra_resume NULL
#define sierra_reset_resume NULL
#endif #endif
static struct usb_driver sierra_driver = {
.name = "sierra",
.probe = usb_serial_probe,
.disconnect = usb_serial_disconnect,
.suspend = usb_serial_suspend,
.resume = usb_serial_resume,
.reset_resume = sierra_reset_resume,
.id_table = id_table,
.no_dynamic_id = 1,
.supports_autosuspend = 1,
};
static struct usb_serial_driver sierra_device = { static struct usb_serial_driver sierra_device = {
.driver = { .driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment