Skip to content

Commit

Permalink
drivers: uart: wch_usart: Fix typo in USART_WCH_IRQ_HANDLER
Browse files Browse the repository at this point in the history
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 <miguel.gazquez@bootlin.com>
  • Loading branch information
miggazElquez authored and kartben committed Feb 22, 2025
1 parent 6b61973 commit 9b2fdac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/serial/uart_wch_usart.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ static DEVICE_API(uart, usart_wch_driver_api) = {
#define USART_WCH_IRQ_HANDLER(idx) \
static void usart_wch_irq_config_func_##idx(const struct device *dev) \
{ \
IRQ_CONNECT(DT_INST_IRQN(idx), DT_INST_IRQ(index, priority), usart_wch_isr, \
IRQ_CONNECT(DT_INST_IRQN(idx), DT_INST_IRQ(idx, priority), usart_wch_isr, \
DEVICE_DT_INST_GET(idx), 0); \
irq_enable(DT_INST_IRQN(idx)); \
}
Expand Down

0 comments on commit 9b2fdac

Please sign in to comment.