]> git.baikalelectronics.ru Git - kernel.git/commit
tty: serial: clean up stop-tx part in altera_uart_tx_chars()
authorJiri Slaby <jslaby@suse.cz>
Tue, 20 Sep 2022 05:20:42 +0000 (07:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:23 +0000 (11:41 +0100)
commit337163ef92d61610fb88e72b85cfc4ae37a1be2f
treeb57bf9f17af3f2a77f9b5fd75eceff2d519d5cc6
parentefeaa9a7382b449273ccb45590b4d068eba5c994
tty: serial: clean up stop-tx part in altera_uart_tx_chars()

[ Upstream commit 0ee7cc0878bc49483a0e2de3ab14b468f67b3eae ]

The "stop TX" path in altera_uart_tx_chars() is open-coded, so:
* use uart_circ_empty() to check if the buffer is empty, and
* when true, call altera_uart_stop_tx().

Cc: Tobias Klauser <tklauser@distanz.ch>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Acked-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20220920052049.20507-3-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 1307c5d33cce ("serial: altera_uart: fix locking in polling mode")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/altera_uart.c