[patch]use generic method if no alternative is provided in usb serial layer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>

Hi Greg,

here's another one for 2.6.30

	Regards
		Oliver

--

commit e6deae5bdab67a8625bbf4f1977b369a9484316a
Author: Oliver Neukum <oneukum@xxxxxxx>
Date:   Fri Feb 6 17:55:46 2009 +0100

    use generic method for usb serial resumption by default

diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 82617eb..08d7769 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -1084,12 +1084,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);
 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux