Skip to content

Commit 9b2fdac

Browse files
miggazElquezkartben
authored andcommitted
drivers: uart: wch_usart: Fix typo in USART_WCH_IRQ_HANDLER
Previously, 'USART_WCH_IRQ_HANDLER' used 'DT_INST_IRQ(index, priority)', which incorrectly referenced 'index' instead of 'idx'. This issue went undetected because 'IRQ_CONNECT' drops the priority value on all boards supported by this driver. Fix by using 'DT_INST_IRQ(idx, priority)'. Signed-off-by: Miguel Gazquez <[email protected]>
1 parent 6b61973 commit 9b2fdac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/serial/uart_wch_usart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ static DEVICE_API(uart, usart_wch_driver_api) = {
312312
#define USART_WCH_IRQ_HANDLER(idx) \
313313
static void usart_wch_irq_config_func_##idx(const struct device *dev) \
314314
{ \
315-
IRQ_CONNECT(DT_INST_IRQN(idx), DT_INST_IRQ(index, priority), usart_wch_isr, \
315+
IRQ_CONNECT(DT_INST_IRQN(idx), DT_INST_IRQ(idx, priority), usart_wch_isr, \
316316
DEVICE_DT_INST_GET(idx), 0); \
317317
irq_enable(DT_INST_IRQN(idx)); \
318318
}

0 commit comments

Comments
 (0)