summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/io_ti.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2013-01-14 16:52:55 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-18 15:45:17 -0800
commitfcdb6a21903bcab0b5f788ba7eb0c31dd06040fd (patch)
tree52dbba61ce46d9487620435712ea0453a0d9bbc3 /drivers/usb/serial/io_ti.c
parent77de2518e854501c1542199449354fab4b2377ac (diff)
USB: io_ti: use tty-port drain delay
Use tty-port drain delay rather than custom implementation in chase_port. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/io_ti.c')
-rw-r--r--drivers/usb/serial/io_ti.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
index 596f8c9474b..3abbdaad838 100644
--- a/drivers/usb/serial/io_ti.c
+++ b/drivers/usb/serial/io_ti.c
@@ -523,7 +523,6 @@ exit_is_tx_active:
static void chase_port(struct edgeport_port *port, unsigned long timeout)
{
- int baud_rate;
struct tty_struct *tty = tty_port_tty_get(&port->port->port);
struct usb_serial *serial = port->port->serial;
wait_queue_t wait;
@@ -561,17 +560,6 @@ static void chase_port(struct edgeport_port *port, unsigned long timeout)
break;
msleep(10);
}
-
- /* disconnected */
- if (serial->disconnected)
- return;
-
- /* wait one more character time, based on baud rate */
- /* (tx_active doesn't seem to wait for the last byte) */
- baud_rate = port->baud_rate;
- if (baud_rate == 0)
- baud_rate = 50;
- msleep(max(1, DIV_ROUND_UP(10000, baud_rate)));
}
static int choose_config(struct usb_device *dev)
@@ -1938,6 +1926,8 @@ static int edge_open(struct tty_struct *tty, struct usb_serial_port *port)
++edge_serial->num_ports_open;
+ port->port.drain_delay = 1;
+
goto release_es_lock;
unlink_int_urb: