From: Jiri Slaby Date: Mon, 11 Apr 2022 10:45:06 +0000 (+0200) Subject: tty: serial: altera: use altera_jtaguart_stop_tx() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9c3a431a486d0c494a68941045885333a5bc1975;p=linux.git tty: serial: altera: use altera_jtaguart_stop_tx() altera_jtaguart_tx_chars() duplicates what altera_jtaguart_stop_tx() already does. So instead of the duplication, call the helper instead. Not only it makes the code cleaner, but it also says what the "if" really does. Cc: Tobias Klauser Acked-by: Tobias Klauser Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220411104506.8990-4-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c index 1c16345d0a1f2..cb791c5149a32 100644 --- a/drivers/tty/serial/altera_jtaguart.c +++ b/drivers/tty/serial/altera_jtaguart.c @@ -168,10 +168,8 @@ static void altera_jtaguart_tx_chars(struct altera_jtaguart *pp) } } - if (pending == 0) { - pp->imr &= ~ALTERA_JTAGUART_CONTROL_WE_MSK; - writel(pp->imr, port->membase + ALTERA_JTAGUART_CONTROL_REG); - } + if (pending == 0) + altera_jtaguart_stop_tx(port); } static irqreturn_t altera_jtaguart_interrupt(int irq, void *data)