[PATCH 09/19] mxser: don't flush buffer from mxser_close() directly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I fail to see the point of calling mxser_flush_buffer() from
mxser_close():
1) The SW xmit buffer is freed in mxser_shutdown_port() right after the
   call to mxser_flush_buffer().  And all 'cnt', 'head', and 'tail' are
   properly initialized to 0 in mxser_activate().
2) The HW buffer is flushed in mxser_shutdown_port() via
   mxser_disable_and_clear_FIFO() too.

So the effect of doing it by mxser_flush_buffer() in mxser_close() is
none. Hence remove it, so that when we use tty_port_close() later, the
code is 1:1 identical.

Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
---
 drivers/tty/mxser.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index 45ee1122a5f7..4dafa16aa29c 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -910,7 +910,6 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
 	if (tty_port_close_start(port, tty, filp) == 0)
 		return;
 	mutex_lock(&port->mutex);
-	mxser_flush_buffer(tty);
 	if (tty_port_initialized(port) && C_HUPCL(tty))
 		tty_port_lower_dtr_rts(port);
 	mxser_shutdown_port(port);
-- 
2.33.1




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux