summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2010-03-17 23:06:04 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 13:21:34 -0700
commit8b0127b2082601e40295045414a8318f2c8ee5a0 (patch)
tree473390271d0ba689c45a1f7cca6068158deef5d8 /drivers/usb/serial
parent684c6e30d389f67ef727c8f5a7b23a09b4cb02e4 (diff)
downloadop-kernel-dev-8b0127b2082601e40295045414a8318f2c8ee5a0.zip
op-kernel-dev-8b0127b2082601e40295045414a8318f2c8ee5a0.tar.gz
USB: pl2303: use generic close
Use usb_serial_generic_close to kill the read and write urbs and to reset the write fifo. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/pl2303.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 28037c1..18d1c44 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -456,21 +456,10 @@ static void pl2303_dtr_rts(struct usb_serial_port *port, int on)
static void pl2303_close(struct usb_serial_port *port)
{
- unsigned long flags;
-
dbg("%s - port %d", __func__, port->number);
- spin_lock_irqsave(&port->lock, flags);
- /* clear out any remaining data in the buffer */
- kfifo_reset_out(&port->write_fifo);
- spin_unlock_irqrestore(&port->lock, flags);
-
- /* shutdown our urbs */
- dbg("%s - shutting down urbs", __func__);
- usb_kill_urb(port->write_urb);
- usb_kill_urb(port->read_urb);
+ usb_serial_generic_close(port);
usb_kill_urb(port->interrupt_in_urb);
-
}
static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port)
OpenPOWER on IntegriCloud