Skip to content

Commit

Permalink
USB: usb_wwan: kill interrupt urb explicitly at suspend
Browse files Browse the repository at this point in the history
As the port interrupt URB is submitted by the subdriver at open, we
should also kill it explicitly at suspend (even though this will be
taken care of by USB serial core otherwise).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed May 27, 2014
1 parent 2b4acea commit ae75c94
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/usb/serial/usb_wwan.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ int usb_wwan_port_remove(struct usb_serial_port *port)
EXPORT_SYMBOL(usb_wwan_port_remove);

#ifdef CONFIG_PM
static void stop_read_write_urbs(struct usb_serial *serial)
static void stop_urbs(struct usb_serial *serial)
{
int i, j;
struct usb_serial_port *port;
Expand All @@ -578,6 +578,7 @@ static void stop_read_write_urbs(struct usb_serial *serial)
usb_kill_urb(portdata->in_urbs[j]);
for (j = 0; j < N_OUT_URB; j++)
usb_kill_urb(portdata->out_urbs[j]);
usb_kill_urb(port->interrupt_in_urb);
}
}

Expand All @@ -595,7 +596,7 @@ int usb_wwan_suspend(struct usb_serial *serial, pm_message_t message)
intfdata->suspended = 1;
spin_unlock_irq(&intfdata->susp_lock);

stop_read_write_urbs(serial);
stop_urbs(serial);

return 0;
}
Expand Down

0 comments on commit ae75c94

Please sign in to comment.