diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index df3a8c74358e..971103714ddd 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -61,7 +61,7 @@ static void uart_port_shutdown(struct tty_port *port); static int uart_dcd_enabled(struct uart_port *uport) { - return uport->status & UPSTAT_DCD_ENABLE; + return !!(uport->status & UPSTAT_DCD_ENABLE); } /* diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 21c2e05c1bc3..bccf4bac22f5 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -367,7 +367,7 @@ static inline int uart_tx_stopped(struct uart_port *port) static inline bool uart_cts_enabled(struct uart_port *uport) { - return uport->status & UPSTAT_CTS_ENABLE; + return !!(uport->status & UPSTAT_CTS_ENABLE); } /*