mxser: rename mxser_close_port() to mxser_stop_rx()
authorJiri Slaby <jslaby@suse.cz>
Thu, 18 Nov 2021 07:31:08 +0000 (08:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Nov 2021 17:33:21 +0000 (18:33 +0100)
As it is the only thing it does now. This is one of the future
serial_core hooks.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20211118073125.12283-3-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/mxser.c

index f9615245a60aefdc5878bf3a4219d56c31af9eba..e9248d39879c2946c506995f78ba2034275840f9 100644 (file)
@@ -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);