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>
{
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,
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);
}
}
#define UPSTAT_AUTOXOFF ((__force upstat_t) (1 << 4))
#define UPSTAT_SYNC_FIFO ((__force upstat_t) (1 << 5))
- int hw_stopped; /* sw-assisted CTS flow state */
+ bool hw_stopped; /* sw-assisted CTS flow state */
unsigned int mctrl; /* current modem ctrl settings */
unsigned int frame_time; /* frame timing in ns */
unsigned int type; /* port type */