drivers: use DT_INST_ENUM_IDX(_OR) macros

Replace `DT_ENUM_IDX(_OR)(DT_DRV_INST(...),` pattern with
`DT_INST_ENUM_IDX(_OR)(...,`.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-11-17 14:01:42 +01:00 committed by Anas Nashif
commit c759a35d08
17 changed files with 28 additions and 30 deletions

View file

@ -1603,7 +1603,7 @@ static const struct uart_stm32_config uart_stm32_cfg_##index = { \
.enr = DT_INST_CLOCKS_CELL(index, bits) \
}, \
.hw_flow_control = DT_INST_PROP(index, hw_flow_control), \
.parity = DT_ENUM_IDX_OR(DT_DRV_INST(index), parity, UART_CFG_PARITY_NONE), \
.parity = DT_INST_ENUM_IDX_OR(index, parity, UART_CFG_PARITY_NONE), \
STM32_UART_POLL_IRQ_HANDLER_FUNC(index) \
.pinctrl_list = uart_pins_##index, \
.pinctrl_list_size = ARRAY_SIZE(uart_pins_##index), \