aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2009-02-05 16:54:25 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-03-24 16:20:29 -0700
commitf8bece8d91f9ed9cff3c98920802f1b3046b7560 (patch)
tree7444caecab970139c8f937d27ef22cdc176010a0 /drivers/usb/serial
parent6e14bda1b18b2e3c16258427fc43ceb43e1bc1d5 (diff)
USB: serial: introduce a flag into the usb serial layer to tell drivers that their URBs are killed due to suspension
This patch introduces a flag into the usb serial layer to tell drivers that their URBs are killed due to suspension. That is necessary to let drivers know whether they should report an error back. Signed-off-by: Oliver Neukum <oneukum@suse.de> Hi Greg, this is for 2.6.30. Patches to use this in drivers are under development. Regards Oliver
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/usb-serial.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index cfcfd5ab06c..c6aaa6dc756 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -1067,6 +1067,8 @@ int usb_serial_suspend(struct usb_interface *intf, pm_message_t message)
struct usb_serial_port *port;
int i, r = 0;
+ serial->suspending = 1;
+
for (i = 0; i < serial->num_ports; ++i) {
port = serial->port[i];
if (port)
@@ -1084,8 +1086,10 @@ int usb_serial_resume(struct usb_interface *intf)
{
struct usb_serial *serial = usb_get_intfdata(intf);
+ serial->suspending = 0;
if (serial->type->resume)
return serial->type->resume(serial);
+
return 0;
}
EXPORT_SYMBOL(usb_serial_resume);