From: Oliver Neukum Date: Fri, 6 Feb 2009 17:06:43 +0000 (+0100) Subject: USB: serial: use generic method if no alternative is provided in usb serial layer X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c49cfa9170256295f4a0fd1668a2411fc05d6b33;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index c6aaa6dc756..18f94084731 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);