]> git.baikalelectronics.ru Git - kernel.git/commitdiff
serial: 8250: kill __do_stop_tx()
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 7 Jun 2022 08:41:53 +0000 (11:41 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jun 2022 11:44:47 +0000 (13:44 +0200)
There seems to be little reason for __do_stop_tx() to exits on its own.
It is rather simple and is only called from __stop_tx(). Thus, move its
logic into __stop_tx().

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220607084154.8172-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_port.c

index 78b6dedc43e6b89ce71c0b79a320ce8f8efd5840..448cfbb05f63b582a3189671acc5860a86ef6b1a 100644 (file)
@@ -1503,12 +1503,6 @@ static void __stop_tx_rs485(struct uart_8250_port *p, u64 stop_delay)
        }
 }
 
-static inline void __do_stop_tx(struct uart_8250_port *p)
-{
-       if (serial8250_clear_THRI(p))
-               serial8250_rpm_put_tx(p);
-}
-
 static inline void __stop_tx(struct uart_8250_port *p)
 {
        struct uart_8250_em485 *em485 = p->em485;
@@ -1542,7 +1536,9 @@ static inline void __stop_tx(struct uart_8250_port *p)
 
                __stop_tx_rs485(p, stop_delay);
        }
-       __do_stop_tx(p);
+
+       if (serial8250_clear_THRI(p))
+               serial8250_rpm_put_tx(p);
 }
 
 static void serial8250_stop_tx(struct uart_port *port)