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

@ -131,7 +131,7 @@ static const struct mdio_driver_api mdio_sam_driver_api = {
#define MDIO_SAM_CONFIG(n) \
static const struct mdio_sam_dev_config mdio_sam_dev_config_##n = { \
.regs = (Gmac *)DT_REG_ADDR(DT_PARENT(DT_DRV_INST(n))), \
.protocol = DT_ENUM_IDX(DT_DRV_INST(n), protocol), \
.protocol = DT_INST_ENUM_IDX(n, protocol), \
};
#define MDIO_SAM_DEVICE(n) \