diff options
author | Oliver Neukum <oliver@neukum.org> | 2009-02-06 20:06:43 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-25 02:20:30 +0300 |
commit | c49cfa9170256295f4a0fd1668a2411fc05d6b33 (patch) | |
tree | 423338985857ecf25a22ac8aa25fe747d4c1d63c /drivers/usb/serial/usb-serial.c | |
parent | 81d043c2f30b157b96cb8ef2b570d12c112e395d (diff) | |
download | linux-c49cfa9170256295f4a0fd1668a2411fc05d6b33.tar.xz |
USB: serial: use generic method if no alternative is provided in usb serial layer
This patch makes use of the generic method if a serial driver provides
no implementation. This simplifies implementing suspend/resume support
in serial drivers.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index c6aaa6dc7564..18f940847316 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -1085,12 +1085,15 @@ EXPORT_SYMBOL(usb_serial_suspend); int usb_serial_resume(struct usb_interface *intf) { struct usb_serial *serial = usb_get_intfdata(intf); + int rv; serial->suspending = 0; if (serial->type->resume) - return serial->type->resume(serial); + rv = serial->type->resume(serial); + else + rv = usb_serial_generic_resume(serial); - return 0; + return rv; } EXPORT_SYMBOL(usb_serial_resume); |