Skip to content

Commit 5350121

Browse files
gmarullcarlescufi
authored andcommitted
drivers: serial: gd32: use instance based macros
Replace usage of DT_DRV_INST with instance based macros. Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent ad08551 commit 5350121

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/serial/usart_gd32.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,7 @@ static const struct uart_driver_api usart_gd32_driver_api = {
317317
.reg = DT_INST_REG_ADDR(n), \
318318
.rcu_periph_clock = DT_INST_PROP(n, rcu_periph_clock), \
319319
.pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(n), \
320-
.parity = DT_ENUM_IDX_OR(DT_DRV_INST(n), parity, \
321-
UART_CFG_PARITY_NONE), \
320+
.parity = DT_INST_ENUM_IDX_OR(n, parity, UART_CFG_PARITY_NONE), \
322321
GD32_USART_IRQ_HANDLER_FUNC_INIT(n) \
323322
}; \
324323
DEVICE_DT_INST_DEFINE(n, &usart_gd32_init, \

0 commit comments

Comments
 (0)