diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2023-03-09 10:09:21 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-17 15:00:40 +0100 |
commit | b5def43a7b3e7e68d6b49a23166f8b886a26bb54 (patch) | |
tree | 391f3d3b83ab96d1c8b78a4deaecb1884e2842f3 /drivers/tty/serial/serial_core.c | |
parent | 826736a6c7c8c3185bfb10e03c10d03d53d6cf94 (diff) | |
download | linux-stable-b5def43a7b3e7e68d6b49a23166f8b886a26bb54.tar.gz linux-stable-b5def43a7b3e7e68d6b49a23166f8b886a26bb54.tar.bz2 linux-stable-b5def43a7b3e7e68d6b49a23166f8b886a26bb54.zip |
serial: Make hw_stopped bool
Convert hw_stopped in uart_port to bool because its more appropriate
type for how it is used.
Also convert the local variable in uart_change_line_settings() caching
old hw_stopped to bool.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20230309080923.11778-7-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/serial_core.c')
-rw-r--r-- | drivers/tty/serial/serial_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index ecdc5d9cdb53..31b69e61e71d 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -182,7 +182,7 @@ static void uart_change_line_settings(struct tty_struct *tty, struct uart_state { struct uart_port *uport = uart_port_check(state); struct ktermios *termios; - int hw_stopped; + bool hw_stopped; /* * If we have no tty, termios, or the port does not exist, @@ -3304,13 +3304,13 @@ void uart_handle_cts_change(struct uart_port *uport, bool active) if (uart_softcts_mode(uport)) { if (uport->hw_stopped) { if (active) { - uport->hw_stopped = 0; + uport->hw_stopped = false; uport->ops->start_tx(uport); uart_write_wakeup(uport); } } else { if (!active) { - uport->hw_stopped = 1; + uport->hw_stopped = true; uport->ops->stop_tx(uport); } } |