drivers: serial: cmsdk_apb: fix irq_rx_ready deviation

The docstring for uart_cmsdk_apb_irq_rx_ready says "@return 1 if an
interrupt is ready, 0 otherwise" but the function actually returns 2 on
success. This commit fixes this to conform with serial driver API.

Signed-off-by: Jason Mitchell <jmitchell@radicalsemiconductor.com>
This commit is contained in:
Jason Mitchell 2023-08-03 10:12:30 -07:00 committed by Chris Friedt
parent 112e48eb28
commit 74d08d69b2

View file

@ -369,7 +369,7 @@ static int uart_cmsdk_apb_irq_rx_ready(const struct device *dev)
{
const struct uart_cmsdk_apb_config *dev_cfg = dev->config;
return dev_cfg->uart->state & UART_RX_BF;
return (dev_cfg->uart->state & UART_RX_BF) == UART_RX_BF;
}
/**