diff --git a/drivers/clock_control/clock_control_mcux_scg.c b/drivers/clock_control/clock_control_mcux_scg.c index 40eba39629..690c133dd1 100644 --- a/drivers/clock_control/clock_control_mcux_scg.c +++ b/drivers/clock_control/clock_control_mcux_scg.c @@ -18,7 +18,7 @@ #include LOG_MODULE_REGISTER(clock_control_scg); -#define MCUX_SCG_CLOCK_NODE(name) DT_CHILD(DT_DRV_INST(0), name) +#define MCUX_SCG_CLOCK_NODE(name) DT_INST_CHILD(0, name) static int mcux_scg_on(const struct device *dev, clock_control_subsys_t sub_system) diff --git a/drivers/ethernet/eth_e1000.c b/drivers/ethernet/eth_e1000.c index 71b8b7f7ea..2877e622d9 100644 --- a/drivers/ethernet/eth_e1000.c +++ b/drivers/ethernet/eth_e1000.c @@ -21,7 +21,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #if defined(CONFIG_ETH_E1000_PTP_CLOCK) #include -#define PTP_INST_NODEID(n) DT_CHILD(DT_DRV_INST(n), ptp) +#define PTP_INST_NODEID(n) DT_INST_CHILD(n, ptp) #endif #if defined(CONFIG_ETH_E1000_VERBOSE_DEBUG) diff --git a/drivers/ethernet/eth_mcux.c b/drivers/ethernet/eth_mcux.c index 66291d9be1..7fcd20642c 100644 --- a/drivers/ethernet/eth_mcux.c +++ b/drivers/ethernet/eth_mcux.c @@ -1405,7 +1405,7 @@ static void eth_mcux_err_isr(const struct device *dev) (ETH_MCUX_NONE)) #if defined(CONFIG_PTP_CLOCK_MCUX) -#define PTP_INST_NODEID(n) DT_CHILD(DT_DRV_INST(n), ptp) +#define PTP_INST_NODEID(n) DT_INST_CHILD(n, ptp) #define ETH_MCUX_IRQ_PTP_INIT(n) \ do { \ diff --git a/drivers/ethernet/eth_sam_gmac.c b/drivers/ethernet/eth_sam_gmac.c index 237af47ff1..1c6f364d71 100644 --- a/drivers/ethernet/eth_sam_gmac.c +++ b/drivers/ethernet/eth_sam_gmac.c @@ -2213,8 +2213,8 @@ static const struct eth_sam_dev_cfg eth0_config = { .periph_id = DT_INST_PROP_OR(0, peripheral_id, 0), #endif .config_func = eth0_irq_config, -#if DT_NODE_EXISTS(DT_CHILD(DT_DRV_INST(0), phy)) - .phy_dev = DEVICE_DT_GET(DT_CHILD(DT_DRV_INST(0), phy)) +#if DT_NODE_EXISTS(DT_INST_CHILD(0, phy)) + .phy_dev = DEVICE_DT_GET(DT_INST_CHILD(0, phy)) #else #error "No PHY driver specified" #endif diff --git a/drivers/flash/flash_simulator.c b/drivers/flash/flash_simulator.c index 038549c968..ffcb5367b9 100644 --- a/drivers/flash/flash_simulator.c +++ b/drivers/flash/flash_simulator.c @@ -31,9 +31,9 @@ /* configuration derived from DT */ #ifdef CONFIG_ARCH_POSIX -#define SOC_NV_FLASH_NODE DT_CHILD(DT_DRV_INST(0), flash_0) +#define SOC_NV_FLASH_NODE DT_INST_CHILD(0, flash_0) #else -#define SOC_NV_FLASH_NODE DT_CHILD(DT_DRV_INST(0), flash_sim_0) +#define SOC_NV_FLASH_NODE DT_INST_CHILD(0, flash_sim_0) #endif /* CONFIG_ARCH_POSIX */ #define FLASH_SIMULATOR_BASE_OFFSET DT_REG_ADDR(SOC_NV_FLASH_NODE) diff --git a/drivers/gpio/gpio_xlnx_axi.c b/drivers/gpio/gpio_xlnx_axi.c index 68d807f328..69c4fcef87 100644 --- a/drivers/gpio/gpio_xlnx_axi.c +++ b/drivers/gpio/gpio_xlnx_axi.c @@ -249,10 +249,9 @@ static const struct gpio_driver_api gpio_xlnx_axi_driver_api = { #define GPIO_XLNX_AXI_GPIO2_HAS_COMPAT_STATUS_OKAY(n) \ UTIL_AND( \ - DT_NODE_HAS_COMPAT(DT_CHILD(DT_DRV_INST(n), gpio2), \ + DT_NODE_HAS_COMPAT(DT_INST_CHILD(n, gpio2), \ xlnx_xps_gpio_1_00_a_gpio2), \ - DT_NODE_HAS_STATUS(DT_CHILD(DT_DRV_INST(n), gpio2), \ - okay) \ + DT_NODE_HAS_STATUS(DT_INST_CHILD(n, gpio2), okay) \ ) #define GPIO_XLNX_AXI_GPIO2_COND_INIT(n) \ @@ -281,7 +280,7 @@ static const struct gpio_driver_api gpio_xlnx_axi_driver_api = { .all_outputs = DT_INST_PROP_OR(n, xlnx_all_outputs2, 0),\ }; \ \ - DEVICE_DT_DEFINE(DT_CHILD(DT_DRV_INST(n), gpio2), \ + DEVICE_DT_DEFINE(DT_INST_CHILD(n, gpio2), \ &gpio_xlnx_axi_init, \ NULL, \ &gpio_xlnx_axi_##n##_2_data, \