aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/serial/sierra.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index ecedd833818d..4865aff892e8 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -456,12 +456,6 @@ static int sierra_open(struct usb_serial_port *port, struct file *filp)
456 return (0); 456 return (0);
457} 457}
458 458
459static inline void stop_urb(struct urb *urb)
460{
461 if (urb && urb->status == -EINPROGRESS)
462 usb_kill_urb(urb);
463}
464
465static void sierra_close(struct usb_serial_port *port, struct file *filp) 459static void sierra_close(struct usb_serial_port *port, struct file *filp)
466{ 460{
467 int i; 461 int i;
@@ -479,9 +473,9 @@ static void sierra_close(struct usb_serial_port *port, struct file *filp)
479 473
480 /* Stop reading/writing urbs */ 474 /* Stop reading/writing urbs */
481 for (i = 0; i < N_IN_URB; i++) 475 for (i = 0; i < N_IN_URB; i++)
482 stop_urb(portdata->in_urbs[i]); 476 usb_unlink_urb(portdata->in_urbs[i]);
483 for (i = 0; i < N_OUT_URB; i++) 477 for (i = 0; i < N_OUT_URB; i++)
484 stop_urb(portdata->out_urbs[i]); 478 usb_unlink_urb(portdata->out_urbs[i]);
485 } 479 }
486 port->tty = NULL; 480 port->tty = NULL;
487} 481}
@@ -585,9 +579,9 @@ static void sierra_shutdown(struct usb_serial *serial)
585 port = serial->port[i]; 579 port = serial->port[i];
586 portdata = usb_get_serial_port_data(port); 580 portdata = usb_get_serial_port_data(port);
587 for (j = 0; j < N_IN_URB; j++) 581 for (j = 0; j < N_IN_URB; j++)
588 stop_urb(portdata->in_urbs[j]); 582 usb_unlink_urb(portdata->in_urbs[j]);
589 for (j = 0; j < N_OUT_URB; j++) 583 for (j = 0; j < N_OUT_URB; j++)
590 stop_urb(portdata->out_urbs[j]); 584 usb_unlink_urb(portdata->out_urbs[j]);
591 } 585 }
592 586
593 /* Now free them */ 587 /* Now free them */