USB: serial: enable async suspend for usb serial port device
authorMing Lei <tom.leiming@gmail.com>
Tue, 13 Jul 2010 15:56:24 +0000 (23:56 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Aug 2010 21:35:39 +0000 (14:35 -0700)
Usb serial port device is child of its usb interface device, so
we can enable async suspend of usb serial port device to speedup
system suspend.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/usb-serial.c

index 443468e9d66e015722b3b2baeda9317a0b6ecd84..2a982e62963b5b76a7bd894c412690b1ddb9381d 100644 (file)
@@ -1071,6 +1071,8 @@ int usb_serial_probe(struct usb_interface *interface,
                dev_set_name(&port->dev, "ttyUSB%d", port->number);
                dbg ("%s - registering %s", __func__, dev_name(&port->dev));
                port->dev_state = PORT_REGISTERING;
+               device_enable_async_suspend(&port->dev);
+
                retval = device_add(&port->dev);
                if (retval) {
                        dev_err(&port->dev, "Error registering port device, "