@@ -2354,10 +2354,7 @@ static void mgslpc_close(struct tty_struct *tty, struct file * filp)
mgslpc_wait_until_sent(tty, info->timeout);
mgslpc_flush_buffer(tty);
-
- tty_ldisc_flush(tty);
shutdown(info, tty);
-
tty_port_close_end(port, tty);
tty_port_tty_set(port, NULL);
cleanup:
@@ -1420,8 +1420,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
}
shutdown(tty, state);
rs_flush_buffer(tty);
-
- tty_ldisc_flush(tty);
port->tty = NULL;
tty_port_close_end(port, tty);
@@ -1022,8 +1022,6 @@ static void rp_close(struct tty_struct *tty, struct file *filp)
sClrDTR(cp);
rp_flush_buffer(tty);
-
- tty_ldisc_flush(tty);
clear_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
@@ -1439,8 +1439,6 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
wake_up_interruptible(&port->open_wait);
mutex_unlock(&port->mutex);
-
- tty_ldisc_flush(tty);
}
static void uart_wait_until_sent(struct tty_struct *tty, int timeout)
@@ -3099,7 +3099,6 @@ static void mgsl_close(struct tty_struct *tty, struct file * filp)
if (info->port.flags & ASYNC_INITIALIZED)
mgsl_wait_until_sent(tty, info->timeout);
mgsl_flush_buffer(tty);
- tty_ldisc_flush(tty);
shutdown(info);
mutex_unlock(&info->port.mutex);
@@ -729,7 +729,6 @@ static void close(struct tty_struct *tty, struct file *filp)
if (info->port.flags & ASYNC_INITIALIZED)
wait_until_sent(tty, info->timeout);
flush_buffer(tty);
- tty_ldisc_flush(tty);
shutdown(info);
mutex_unlock(&info->port.mutex);
@@ -816,7 +816,6 @@ static void close(struct tty_struct *tty, struct file *filp)
wait_until_sent(tty, info->timeout);
flush_buffer(tty);
- tty_ldisc_flush(tty);
shutdown(info);
mutex_unlock(&info->port.mutex);
@@ -503,8 +503,6 @@ void tty_port_close_end(struct tty_port *port, struct tty_struct *tty)
{
unsigned long flags;
- tty_ldisc_flush(tty);
-
spin_lock_irqsave(&port->lock, flags);
if (port->blocked_open) {
The tty_port_close_start() helper already flushes the tty and ldisc buffers on final close; tty drivers which use this helper need not repeat tty_ldisc_flush(). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> --- drivers/char/pcmcia/synclink_cs.c | 3 --- drivers/tty/amiserial.c | 2 -- drivers/tty/rocket.c | 2 -- drivers/tty/serial/serial_core.c | 2 -- drivers/tty/synclink.c | 1 - drivers/tty/synclink_gt.c | 1 - drivers/tty/synclinkmp.c | 1 - drivers/tty/tty_port.c | 2 -- 8 files changed, 14 deletions(-)