drivers: serial: gd32: use instance based macros

Replace usage of DT_DRV_INST with instance based macros.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-12-16 11:20:23 +01:00 committed by Carles Cufí
commit 5350121e64

View file

@ -317,8 +317,7 @@ static const struct uart_driver_api usart_gd32_driver_api = {
.reg = DT_INST_REG_ADDR(n), \
.rcu_periph_clock = DT_INST_PROP(n, rcu_periph_clock), \
.pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(n), \
.parity = DT_ENUM_IDX_OR(DT_DRV_INST(n), parity, \
UART_CFG_PARITY_NONE), \
.parity = DT_INST_ENUM_IDX_OR(n, parity, UART_CFG_PARITY_NONE), \
GD32_USART_IRQ_HANDLER_FUNC_INIT(n) \
}; \
DEVICE_DT_INST_DEFINE(n, &usart_gd32_init, \