diff options
author | Elina Pasheva <epasheva@sierrawireless.com> | 2010-02-11 21:37:40 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-02 17:55:03 -0500 |
commit | 7650cd9678df29b01d1e46a9d2ce7e5d8c72b3ce (patch) | |
tree | 1e0693330105fdec986d931c128a5de906443401 /drivers/usb/serial/sierra.c | |
parent | 05197921ff3dad52d99fd1647974c57d9c28d40e (diff) |
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: Elina Pasheva <epasheva@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/sierra.c | 30 ++++++++++++++++++++----------
1 file changed, 20 insertions(+), 10 deletions(-)
Diffstat (limited to 'drivers/usb/serial/sierra.c')
-rw-r--r-- | drivers/usb/serial/sierra.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index bb0d56c32175..6aeea40081c2 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c | |||
@@ -304,16 +304,6 @@ static const struct usb_device_id id_table[] = { | |||
304 | }; | 304 | }; |
305 | MODULE_DEVICE_TABLE(usb, id_table); | 305 | MODULE_DEVICE_TABLE(usb, id_table); |
306 | 306 | ||
307 | static struct usb_driver sierra_driver = { | ||
308 | .name = "sierra", | ||
309 | .probe = usb_serial_probe, | ||
310 | .disconnect = usb_serial_disconnect, | ||
311 | .suspend = usb_serial_suspend, | ||
312 | .resume = usb_serial_resume, | ||
313 | .id_table = id_table, | ||
314 | .no_dynamic_id = 1, | ||
315 | .supports_autosuspend = 1, | ||
316 | }; | ||
317 | 307 | ||
318 | struct sierra_port_private { | 308 | struct sierra_port_private { |
319 | spinlock_t lock; /* lock the structure */ | 309 | spinlock_t lock; /* lock the structure */ |
@@ -1061,11 +1051,31 @@ static int sierra_resume(struct usb_serial *serial) | |||
1061 | 1051 | ||
1062 | return ec ? -EIO : 0; | 1052 | return ec ? -EIO : 0; |
1063 | } | 1053 | } |
1054 | |||
1055 | static int sierra_reset_resume(struct usb_interface *intf) | ||
1056 | { | ||
1057 | struct usb_serial *serial = usb_get_intfdata(intf); | ||
1058 | dev_err(&serial->dev->dev, "%s\n", __func__); | ||
1059 | return usb_serial_resume(intf); | ||
1060 | } | ||
1064 | #else | 1061 | #else |
1065 | #define sierra_suspend NULL | 1062 | #define sierra_suspend NULL |
1066 | #define sierra_resume NULL | 1063 | #define sierra_resume NULL |
1064 | #define sierra_reset_resume NULL | ||
1067 | #endif | 1065 | #endif |
1068 | 1066 | ||
1067 | static struct usb_driver sierra_driver = { | ||
1068 | .name = "sierra", | ||
1069 | .probe = usb_serial_probe, | ||
1070 | .disconnect = usb_serial_disconnect, | ||
1071 | .suspend = usb_serial_suspend, | ||
1072 | .resume = usb_serial_resume, | ||
1073 | .reset_resume = sierra_reset_resume, | ||
1074 | .id_table = id_table, | ||
1075 | .no_dynamic_id = 1, | ||
1076 | .supports_autosuspend = 1, | ||
1077 | }; | ||
1078 | |||
1069 | static struct usb_serial_driver sierra_device = { | 1079 | static struct usb_serial_driver sierra_device = { |
1070 | .driver = { | 1080 | .driver = { |
1071 | .owner = THIS_MODULE, | 1081 | .owner = THIS_MODULE, |