diff options
author | Jiri Slaby <jslaby@suse.cz> | 2022-02-24 12:10:28 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-25 10:38:54 +0100 |
commit | f52361790aaf58d489952a7641777549979428f4 (patch) | |
tree | 18bff0b619dd279781f371f04907daea74347daa /drivers/tty | |
parent | d185a852e17c2ca6a3c796dbde4ee98d0ecbded1 (diff) | |
download | lwn-f52361790aaf58d489952a7641777549979428f4.tar.gz lwn-f52361790aaf58d489952a7641777549979428f4.zip |
tty: serial: lpc32xx_hs: use serial_lpc32xx_stop_tx() helper
Instead of open-coding what serial_lpc32xx_stop_tx() already does, call
it in __serial_lpc32xx_tx() directly.
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20220224111028.20917-6-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/lpc32xx_hs.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/tty/serial/lpc32xx_hs.c b/drivers/tty/serial/lpc32xx_hs.c index 07c4161eb4cc..54437a087aa0 100644 --- a/drivers/tty/serial/lpc32xx_hs.c +++ b/drivers/tty/serial/lpc32xx_hs.c @@ -276,10 +276,11 @@ static void __serial_lpc32xx_rx(struct uart_port *port) tty_flip_buffer_push(tport); } +static void serial_lpc32xx_stop_tx(struct uart_port *port); + static void __serial_lpc32xx_tx(struct uart_port *port) { struct circ_buf *xmit = &port->state->xmit; - unsigned int tmp; if (port->x_char) { writel((u32)port->x_char, LPC32XX_HSUART_FIFO(port->membase)); @@ -306,11 +307,8 @@ static void __serial_lpc32xx_tx(struct uart_port *port) uart_write_wakeup(port); exit_tx: - if (uart_circ_empty(xmit)) { - tmp = readl(LPC32XX_HSUART_CTRL(port->membase)); - tmp &= ~LPC32XX_HSU_TX_INT_EN; - writel(tmp, LPC32XX_HSUART_CTRL(port->membase)); - } + if (uart_circ_empty(xmit)) + serial_lpc32xx_stop_tx(port); } static irqreturn_t serial_lpc32xx_interrupt(int irq, void *dev_id) |