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:
parent
1832d68e01
commit
c759a35d08
17 changed files with 28 additions and 30 deletions
|
@ -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) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue