Thread (21 messages) read the whole thread 21 messages, 2 authors, 2021-11-18
STALE1716d LANDED

Landed in mainline as 568a2b9c1289 on 2021-11-25.

[PATCH 02/19] mxser: rename mxser_close_port() to mxser_stop_rx()

From: Jiri Slaby <hidden>
Date: 2021-11-18 07:31:38
Also in: lkml
Subsystem: moxa smartio/industio/intellio serial card, the rest, tty layer and serial drivers · Maintainers: Jiri Slaby, Linus Torvalds, Greg Kroah-Hartman

As it is the only thing it does now. This is one of the future
serial_core hooks.

Signed-off-by: Jiri Slaby <redacted>
---
 drivers/tty/mxser.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index f9615245a60a..e9248d39879c 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -874,16 +874,13 @@ static void mxser_flush_buffer(struct tty_struct *tty)
 	tty_wakeup(tty);
 }
 
-
-static void mxser_close_port(struct tty_port *port)
+/*
+ * To stop accepting input, we disable the receive line status interrupts, and
+ * tell the interrupt driver to stop checking the data ready bit in the line
+ * status register.
+ */
+static void mxser_stop_rx(struct mxser_port *info)
 {
-	struct mxser_port *info = container_of(port, struct mxser_port, port);
-	/*
-	 * At this point we stop accepting input.  To do this, we
-	 * disable the receive line status interrupts, and tell the
-	 * interrupt driver to stop checking the data ready bit in the
-	 * line status register.
-	 */
 	info->IER &= ~UART_IER_RLSI;
 	if (info->board->must_hwid)
 		info->IER &= ~MOXA_MUST_RECV_ISR;
@@ -908,7 +905,7 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
 		return;
 	info->closing = 1;
 	mutex_lock(&port->mutex);
-	mxser_close_port(port);
+	mxser_stop_rx(info);
 	mxser_flush_buffer(tty);
 	if (tty_port_initialized(port) && C_HUPCL(tty))
 		tty_port_lower_dtr_rts(port);
-- 
2.33.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help