diff options
-rw-r--r-- | drivers/usb/serial/usb_wwan.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c index fe5e48eb9693..817e6ff8de8b 100644 --- a/drivers/usb/serial/usb_wwan.c +++ b/drivers/usb/serial/usb_wwan.c | |||
@@ -424,6 +424,7 @@ int usb_wwan_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
424 | spin_lock_irq(&intfdata->susp_lock); | 424 | spin_lock_irq(&intfdata->susp_lock); |
425 | portdata->opened = 1; | 425 | portdata->opened = 1; |
426 | spin_unlock_irq(&intfdata->susp_lock); | 426 | spin_unlock_irq(&intfdata->susp_lock); |
427 | /* this balances a get in the generic USB serial code */ | ||
427 | usb_autopm_put_interface(serial->interface); | 428 | usb_autopm_put_interface(serial->interface); |
428 | 429 | ||
429 | return 0; | 430 | return 0; |
@@ -450,7 +451,8 @@ void usb_wwan_close(struct usb_serial_port *port) | |||
450 | usb_kill_urb(portdata->in_urbs[i]); | 451 | usb_kill_urb(portdata->in_urbs[i]); |
451 | for (i = 0; i < N_OUT_URB; i++) | 452 | for (i = 0; i < N_OUT_URB; i++) |
452 | usb_kill_urb(portdata->out_urbs[i]); | 453 | usb_kill_urb(portdata->out_urbs[i]); |
453 | usb_autopm_get_interface(serial->interface); | 454 | /* balancing - important as an error cannot be handled*/ |
455 | usb_autopm_get_interface_no_resume(serial->interface); | ||
454 | serial->interface->needs_remote_wakeup = 0; | 456 | serial->interface->needs_remote_wakeup = 0; |
455 | } | 457 | } |
456 | } | 458 | } |