Skip to content

Commit 74d08d6

Browse files
radsemijmitchellcfriedt
authored andcommitted
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 <[email protected]>
1 parent 112e48e commit 74d08d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/serial/uart_cmsdk_apb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ static int uart_cmsdk_apb_irq_rx_ready(const struct device *dev)
369369
{
370370
const struct uart_cmsdk_apb_config *dev_cfg = dev->config;
371371

372-
return dev_cfg->uart->state & UART_RX_BF;
372+
return (dev_cfg->uart->state & UART_RX_BF) == UART_RX_BF;
373373
}
374374

375375
/**

0 commit comments

Comments
 (0)