summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-28 20:34:56 -0700
committerSimon Glass <sjg@chromium.org>2021-01-05 12:26:35 -0700
commit65e25bea597ccaaea756c593318bea1e574d8df1 (patch)
tree6106e01b358d6637e94978b95c7e8fd5c99adc3d
parent8629d30a32e7b4ff8323292364116c08033bd57b (diff)
downloadu-boot-65e25bea597ccaaea756c593318bea1e574d8df1.tar.gz
u-boot-65e25bea597ccaaea756c593318bea1e574d8df1.tar.bz2
u-boot-65e25bea597ccaaea756c593318bea1e574d8df1.zip
dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()
In the spirit of using the same base name for all of these related macros, rename this to have the operation at the end. This is not widely used so the impact is fairly small. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--arch/arm/lib/gic-v3-its.c10
-rw-r--r--arch/arm/mach-aspeed/ast2500/clk_ast2500.c2
-rw-r--r--arch/arm/mach-k3/am6_init.c2
-rw-r--r--arch/arm/mach-k3/common.c2
-rw-r--r--arch/arm/mach-k3/j721e_init.c2
-rw-r--r--arch/arm/mach-mediatek/mt7629/init.c4
-rw-r--r--arch/arm/mach-mediatek/mt8516/init.c2
-rw-r--r--arch/arm/mach-rockchip/misc.c4
-rw-r--r--arch/arm/mach-rockchip/px30/clk_px30.c2
-rw-r--r--arch/arm/mach-rockchip/rk3036/clk_rk3036.c2
-rw-r--r--arch/arm/mach-rockchip/rk3128/clk_rk3128.c2
-rw-r--r--arch/arm/mach-rockchip/rk3188/clk_rk3188.c2
-rw-r--r--arch/arm/mach-rockchip/rk322x/clk_rk322x.c2
-rw-r--r--arch/arm/mach-rockchip/rk3288/clk_rk3288.c2
-rw-r--r--arch/arm/mach-rockchip/rk3308/clk_rk3308.c2
-rw-r--r--arch/arm/mach-rockchip/rk3328/clk_rk3328.c2
-rw-r--r--arch/arm/mach-rockchip/rk3368/clk_rk3368.c2
-rw-r--r--arch/arm/mach-rockchip/rk3399/clk_rk3399.c4
-rw-r--r--arch/arm/mach-rockchip/rv1108/clk_rv1108.c2
-rw-r--r--arch/arm/mach-socfpga/clock_manager_agilex.c2
-rw-r--r--arch/arm/mach-stm32mp/bsec.c2
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32key.c2
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c6
-rw-r--r--arch/arm/mach-stm32mp/cpu.c6
-rw-r--r--arch/arm/mach-uniphier/micro-support-card.c2
-rw-r--r--arch/arm/mach-zynq/clk.c4
-rw-r--r--arch/arm/mach-zynq/timer.c2
-rw-r--r--arch/mips/mach-mtmips/mt7628/init.c2
-rw-r--r--arch/riscv/lib/sifive_clint.c2
-rw-r--r--board/dhelectronics/dh_stm32mp1/board.c6
-rw-r--r--board/google/gru/gru.c2
-rw-r--r--board/nvidia/jetson-tk1/jetson-tk1.c2
-rw-r--r--board/nvidia/nyan-big/nyan-big.c2
-rw-r--r--board/renesas/ulcb/cpld.c2
-rw-r--r--board/sifive/fu540/fu540.c2
-rw-r--r--board/st/common/cmd_stboard.c2
-rw-r--r--board/st/common/stm32mp_dfu.c4
-rw-r--r--board/st/common/stpmic1.c4
-rw-r--r--board/st/common/stusb160x.c2
-rw-r--r--board/st/stm32mp1/stm32mp1.c12
-rw-r--r--board/ti/j721e/evm.c4
-rw-r--r--board/toradex/apalis-tk1/apalis-tk1.c4
-rw-r--r--drivers/clk/clk_stm32mp1.c2
-rw-r--r--drivers/clk/clk_zynqmp.c2
-rw-r--r--drivers/clk/imx/clk-imx8.c2
-rw-r--r--drivers/clk/mediatek/clk-mtk.c6
-rw-r--r--drivers/clk/sifive/fu540-prci.c2
-rw-r--r--drivers/firmware/scmi/scmi_agent-uclass.c4
-rw-r--r--drivers/gpio/gpio-uclass.c2
-rw-r--r--drivers/misc/i2c_eeprom.c2
-rw-r--r--drivers/misc/rockchip-efuse.c2
-rw-r--r--drivers/misc/stm32mp_fuse.c16
-rw-r--r--drivers/mtd/nand/raw/arasan_nfc.c2
-rw-r--r--drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c2
-rw-r--r--drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c2
-rw-r--r--drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c2
-rw-r--r--drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c2
-rw-r--r--drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c2
-rw-r--r--drivers/mtd/nand/raw/davinci_nand.c2
-rw-r--r--drivers/mtd/nand/raw/denali_dt.c2
-rw-r--r--drivers/mtd/nand/raw/mxs_nand_dt.c2
-rw-r--r--drivers/mtd/nand/raw/octeontx_nand.c6
-rw-r--r--drivers/mtd/nand/raw/pxa3xx_nand.c2
-rw-r--r--drivers/mtd/nand/raw/stm32_fmc2_nand.c2
-rw-r--r--drivers/mtd/nand/raw/tegra_nand.c2
-rw-r--r--drivers/mtd/nand/raw/vf610_nfc.c2
-rw-r--r--drivers/mtd/nand/raw/zynq_nand.c2
-rw-r--r--drivers/reset/reset-ast2500.c2
-rw-r--r--drivers/video/lg4573.c2
-rw-r--r--include/dm/device.h2
-rw-r--r--include/dm/uclass.h2
-rw-r--r--test/dm/core.c2
-rw-r--r--test/dm/test-fdt.c6
73 files changed, 110 insertions, 110 deletions
diff --git a/arch/arm/lib/gic-v3-its.c b/arch/arm/lib/gic-v3-its.c
index a1657e3853..f5a921b3d1 100644
--- a/arch/arm/lib/gic-v3-its.c
+++ b/arch/arm/lib/gic-v3-its.c
@@ -43,10 +43,10 @@ static int gic_v3_its_get_gic_addr(struct gic_v3_its_priv *priv)
int ret;
ret = uclass_get_device_by_driver(UCLASS_IRQ,
- DM_GET_DRIVER(arm_gic_v3_its), &dev);
+ DM_DRIVER_GET(arm_gic_v3_its), &dev);
if (ret) {
pr_err("%s: failed to get %s irq device\n", __func__,
- DM_GET_DRIVER(arm_gic_v3_its)->name);
+ DM_DRIVER_GET(arm_gic_v3_its)->name);
return ret;
}
@@ -74,17 +74,17 @@ static int gic_v3_its_get_gic_lpi_addr(struct gic_v3_its_priv *priv)
int ret;
ret = uclass_get_device_by_driver(UCLASS_SYSCON,
- DM_GET_DRIVER(gic_lpi_syscon), &dev);
+ DM_DRIVER_GET(gic_lpi_syscon), &dev);
if (ret) {
pr_err("%s: failed to get %s syscon device\n", __func__,
- DM_GET_DRIVER(gic_lpi_syscon)->name);
+ DM_DRIVER_GET(gic_lpi_syscon)->name);
return ret;
}
regmap = syscon_get_regmap(dev);
if (!regmap) {
pr_err("%s: failed to regmap for %s syscon device\n", __func__,
- DM_GET_DRIVER(gic_lpi_syscon)->name);
+ DM_DRIVER_GET(gic_lpi_syscon)->name);
return -ENODEV;
}
priv->lpi_base = regmap->ranges[0].start;
diff --git a/arch/arm/mach-aspeed/ast2500/clk_ast2500.c b/arch/arm/mach-aspeed/ast2500/clk_ast2500.c
index 3e9f5e57ed..02bd3f67c9 100644
--- a/arch/arm/mach-aspeed/ast2500/clk_ast2500.c
+++ b/arch/arm/mach-aspeed/ast2500/clk_ast2500.c
@@ -12,7 +12,7 @@
int ast_get_clk(struct udevice **devp)
{
return uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(aspeed_ast2500_scu), devp);
+ DM_DRIVER_GET(aspeed_ast2500_scu), devp);
}
void *ast_get_scu(void)
diff --git a/arch/arm/mach-k3/am6_init.c b/arch/arm/mach-k3/am6_init.c
index 0fed5aec59..dea470c02f 100644
--- a/arch/arm/mach-k3/am6_init.c
+++ b/arch/arm/mach-k3/am6_init.c
@@ -238,7 +238,7 @@ void board_init_f(ulong dummy)
do_board_detect();
#if defined(CONFIG_CPU_V7R) && defined(CONFIG_K3_AVS0)
- ret = uclass_get_device_by_driver(UCLASS_MISC, DM_GET_DRIVER(k3_avs),
+ ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(k3_avs),
&dev);
if (ret)
printf("AVS init failed: %d\n", ret);
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 8c903f14ff..8b54e0cf52 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -33,7 +33,7 @@ struct ti_sci_handle *get_ti_sci_handle(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_FIRMWARE,
- DM_GET_DRIVER(ti_sci), &dev);
+ DM_DRIVER_GET(ti_sci), &dev);
if (ret)
panic("Failed to get SYSFW (%d)\n", ret);
diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c
index 0201690f93..1a4f796e5e 100644
--- a/arch/arm/mach-k3/j721e_init.c
+++ b/arch/arm/mach-k3/j721e_init.c
@@ -206,7 +206,7 @@ void board_init_f(ulong dummy)
do_board_detect();
#if defined(CONFIG_CPU_V7R) && defined(CONFIG_K3_AVS0)
- ret = uclass_get_device_by_driver(UCLASS_MISC, DM_GET_DRIVER(k3_avs),
+ ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(k3_avs),
&dev);
if (ret)
printf("AVS init failed: %d\n", ret);
diff --git a/arch/arm/mach-mediatek/mt7629/init.c b/arch/arm/mach-mediatek/mt7629/init.c
index c260413a57..1f102dddd4 100644
--- a/arch/arm/mach-mediatek/mt7629/init.c
+++ b/arch/arm/mach-mediatek/mt7629/init.c
@@ -40,7 +40,7 @@ int mtk_pll_early_init(void)
int ret, i;
ret = uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(mtk_clk_apmixedsys), &dev);
+ DM_DRIVER_GET(mtk_clk_apmixedsys), &dev);
if (ret)
return ret;
@@ -59,7 +59,7 @@ int mtk_pll_early_init(void)
/* setup mcu bus */
ret = uclass_get_device_by_driver(UCLASS_SYSCON,
- DM_GET_DRIVER(mtk_mcucfg), &dev);
+ DM_DRIVER_GET(mtk_mcucfg), &dev);
if (ret)
return ret;
diff --git a/arch/arm/mach-mediatek/mt8516/init.c b/arch/arm/mach-mediatek/mt8516/init.c
index 13be391221..2ffa5595cf 100644
--- a/arch/arm/mach-mediatek/mt8516/init.c
+++ b/arch/arm/mach-mediatek/mt8516/init.c
@@ -52,7 +52,7 @@ int mtk_pll_early_init(void)
int ret, i;
ret = uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(mtk_clk_apmixedsys), &dev);
+ DM_DRIVER_GET(mtk_clk_apmixedsys), &dev);
if (ret)
return ret;
diff --git a/arch/arm/mach-rockchip/misc.c b/arch/arm/mach-rockchip/misc.c
index 28c7c7214c..87eebd9872 100644
--- a/arch/arm/mach-rockchip/misc.c
+++ b/arch/arm/mach-rockchip/misc.c
@@ -67,10 +67,10 @@ int rockchip_cpuid_from_efuse(const u32 cpuid_offset,
/* retrieve the device */
#if CONFIG_IS_ENABLED(ROCKCHIP_EFUSE)
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(rockchip_efuse), &dev);
+ DM_DRIVER_GET(rockchip_efuse), &dev);
#elif CONFIG_IS_ENABLED(ROCKCHIP_OTP)
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(rockchip_otp), &dev);
+ DM_DRIVER_GET(rockchip_otp), &dev);
#endif
if (ret) {
debug("%s: could not find efuse device\n", __func__);
diff --git a/arch/arm/mach-rockchip/px30/clk_px30.c b/arch/arm/mach-rockchip/px30/clk_px30.c
index 98a1bcd224..7edf1321fe 100644
--- a/arch/arm/mach-rockchip/px30/clk_px30.c
+++ b/arch/arm/mach-rockchip/px30/clk_px30.c
@@ -13,7 +13,7 @@
int rockchip_get_clk(struct udevice **devp)
{
return uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(rockchip_px30_cru), devp);
+ DM_DRIVER_GET(rockchip_px30_cru), devp);
}
void *rockchip_get_cru(void)
diff --git a/arch/arm/mach-rockchip/rk3036/clk_rk3036.c b/arch/arm/mach-rockchip/rk3036/clk_rk3036.c
index 5d0def3b52..116dccd7b8 100644
--- a/arch/arm/mach-rockchip/rk3036/clk_rk3036.c
+++ b/arch/arm/mach-rockchip/rk3036/clk_rk3036.c
@@ -14,7 +14,7 @@
int rockchip_get_clk(struct udevice **devp)
{
return uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(rockchip_rk3036_cru), devp);
+ DM_DRIVER_GET(rockchip_rk3036_cru), devp);
}
void *rockchip_get_cru(void)
diff --git a/arch/arm/mach-rockchip/rk3128/clk_rk3128.c b/arch/arm/mach-rockchip/rk3128/clk_rk3128.c
index f9ce1f7234..a1b038c648 100644
--- a/arch/arm/mach-rockchip/rk3128/clk_rk3128.c
+++ b/arch/arm/mach-rockchip/rk3128/clk_rk3128.c
@@ -13,7 +13,7 @@
int rockchip_get_clk(struct udevice **devp)
{
return uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(rockchip_rk3128_cru), devp);
+ DM_DRIVER_GET(rockchip_rk3128_cru), devp);
}
void *rockchip_get_cru(void)
diff --git a/arch/arm/mach-rockchip/rk3188/clk_rk3188.c b/arch/arm/mach-rockchip/rk3188/clk_rk3188.c
index a0dcac3732..94d1d23e1f 100644
--- a/arch/arm/mach-rockchip/rk3188/clk_rk3188.c
+++ b/arch/arm/mach-rockchip/rk3188/clk_rk3188.c
@@ -14,7 +14,7 @@
int rockchip_get_clk(struct udevice **devp)
{
return uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(rockchip_rk3188_cru), devp);
+ DM_DRIVER_GET(rockchip_rk3188_cru), devp);
}
void *rockchip_get_cru(void)
diff --git a/arch/arm/mach-rockchip/rk322x/clk_rk322x.c b/arch/arm/mach-rockchip/rk322x/clk_rk322x.c
index fc5abd736e..2e57672b24 100644
--- a/arch/arm/mach-rockchip/rk322x/clk_rk322x.c
+++ b/arch/arm/mach-rockchip/rk322x/clk_rk322x.c
@@ -13,7 +13,7 @@
int rockchip_get_clk(struct udevice **devp)
{
return uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(rockchip_rk322x_cru), devp);
+ DM_DRIVER_GET(rockchip_rk322x_cru), devp);
}
void *rockchip_get_cru(void)
diff --git a/arch/arm/mach-rockchip/rk3288/clk_rk3288.c b/arch/arm/mach-rockchip/rk3288/clk_rk3288.c
index e05bd06a8d..fb4c0891d0 100644
--- a/arch/arm/mach-rockchip/rk3288/clk_rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/clk_rk3288.c
@@ -14,7 +14,7 @@
int rockchip_get_clk(struct udevice **devp)
{
return uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(rockchip_rk3288_cru), devp);
+ DM_DRIVER_GET(rockchip_rk3288_cru), devp);
}
void *rockchip_get_cru(void)
diff --git a/arch/arm/mach-rockchip/rk3308/clk_rk3308.c b/arch/arm/mach-rockchip/rk3308/clk_rk3308.c
index 1feb237224..ccda53380c 100644
--- a/arch/arm/mach-rockchip/rk3308/clk_rk3308.c
+++ b/arch/arm/mach-rockchip/rk3308/clk_rk3308.c
@@ -13,7 +13,7 @@
int rockchip_get_clk(struct udevice **devp)
{
return uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(rockchip_rk3308_cru), devp);
+ DM_DRIVER_GET(rockchip_rk3308_cru), devp);
}
void *rockchip_get_cru(void)
diff --git a/arch/arm/mach-rockchip/rk3328/clk_rk3328.c b/arch/arm/mach-rockchip/rk3328/clk_rk3328.c
index e5375514de..70c0eb6f98 100644
--- a/arch/arm/mach-rockchip/rk3328/clk_rk3328.c
+++ b/arch/arm/mach-rockchip/rk3328/clk_rk3328.c
@@ -12,7 +12,7 @@
int rockchip_get_clk(struct udevice **devp)
{
return uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(rockchip_rk3328_cru), devp);
+ DM_DRIVER_GET(rockchip_rk3328_cru), devp);
}
void *rockchip_get_cru(void)
diff --git a/arch/arm/mach-rockchip/rk3368/clk_rk3368.c b/arch/arm/mach-rockchip/rk3368/clk_rk3368.c
index 9a33c67bc9..b075319720 100644
--- a/arch/arm/mach-rockchip/rk3368/clk_rk3368.c
+++ b/arch/arm/mach-rockchip/rk3368/clk_rk3368.c
@@ -14,7 +14,7 @@
int rockchip_get_clk(struct udevice **devp)
{
return uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(rockchip_rk3368_cru), devp);
+ DM_DRIVER_GET(rockchip_rk3368_cru), devp);
}
void *rockchip_get_cru(void)
diff --git a/arch/arm/mach-rockchip/rk3399/clk_rk3399.c b/arch/arm/mach-rockchip/rk3399/clk_rk3399.c
index d23a5e9435..9d9a837fc7 100644
--- a/arch/arm/mach-rockchip/rk3399/clk_rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/clk_rk3399.c
@@ -14,7 +14,7 @@
static int rockchip_get_cruclk(struct udevice **devp)
{
return uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(clk_rk3399), devp);
+ DM_DRIVER_GET(clk_rk3399), devp);
}
void *rockchip_get_cru(void)
@@ -35,7 +35,7 @@ void *rockchip_get_cru(void)
static int rockchip_get_pmucruclk(struct udevice **devp)
{
return uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(rockchip_rk3399_pmuclk), devp);
+ DM_DRIVER_GET(rockchip_rk3399_pmuclk), devp);
}
void *rockchip_get_pmucru(void)
diff --git a/arch/arm/mach-rockchip/rv1108/clk_rv1108.c b/arch/arm/mach-rockchip/rv1108/clk_rv1108.c
index b37ae1c494..44b53c407a 100644
--- a/arch/arm/mach-rockchip/rv1108/clk_rv1108.c
+++ b/arch/arm/mach-rockchip/rv1108/clk_rv1108.c
@@ -14,7 +14,7 @@
int rockchip_get_clk(struct udevice **devp)
{
return uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(clk_rv1108), devp);
+ DM_DRIVER_GET(clk_rv1108), devp);
}
void *rockchip_get_cru(void)
diff --git a/arch/arm/mach-socfpga/clock_manager_agilex.c b/arch/arm/mach-socfpga/clock_manager_agilex.c
index 6188a8c3d2..a960176da7 100644
--- a/arch/arm/mach-socfpga/clock_manager_agilex.c
+++ b/arch/arm/mach-socfpga/clock_manager_agilex.c
@@ -24,7 +24,7 @@ static ulong cm_get_rate_dm(u32 id)
int ret;
ret = uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(socfpga_agilex_clk),
+ DM_DRIVER_GET(socfpga_agilex_clk),
&dev);
if (ret)
return 0;
diff --git a/arch/arm/mach-stm32mp/bsec.c b/arch/arm/mach-stm32mp/bsec.c
index 85a9e6f84e..84e0bddcd4 100644
--- a/arch/arm/mach-stm32mp/bsec.c
+++ b/arch/arm/mach-stm32mp/bsec.c
@@ -525,7 +525,7 @@ bool bsec_dbgswenable(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stm32mp_bsec), &dev);
+ DM_DRIVER_GET(stm32mp_bsec), &dev);
if (ret || !dev) {
pr_debug("bsec driver not available\n");
return false;
diff --git a/arch/arm/mach-stm32mp/cmd_stm32key.c b/arch/arm/mach-stm32mp/cmd_stm32key.c
index f191085a12..544bab3848 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32key.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32key.c
@@ -31,7 +31,7 @@ static void fuse_hash_value(u32 addr, bool print)
int i, ret;
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stm32mp_bsec),
+ DM_DRIVER_GET(stm32mp_bsec),
&dev);
if (ret) {
pr_err("Can't find stm32mp_bsec driver\n");
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
index a777827c55..fc9a2af545 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
@@ -1340,7 +1340,7 @@ int stm32prog_pmic_read(struct stm32prog_data *data, u32 offset, u8 *buffer,
pr_debug("%s: %x %lx\n", __func__, offset, *size);
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stpmic1_nvm),
+ DM_DRIVER_GET(stpmic1_nvm),
&dev);
if (ret)
return ret;
@@ -1351,7 +1351,7 @@ int stm32prog_pmic_read(struct stm32prog_data *data, u32 offset, u8 *buffer,
memset(data->pmic_part, 0, PMIC_SIZE);
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stpmic1_nvm),
+ DM_DRIVER_GET(stpmic1_nvm),
&dev);
if (ret)
return ret;
@@ -1389,7 +1389,7 @@ int stm32prog_pmic_start(struct stm32prog_data *data)
}
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stpmic1_nvm),
+ DM_DRIVER_GET(stpmic1_nvm),
&dev);
if (ret)
return ret;
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index 1520c6eaed..29c0d92195 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -318,7 +318,7 @@ static u32 get_otp(int index, int shift, int mask)
u32 otp = 0;
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stm32mp_bsec),
+ DM_DRIVER_GET(stm32mp_bsec),
&dev);
if (!ret)
@@ -563,7 +563,7 @@ __weak int setup_mac_address(void)
return 0;
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stm32mp_bsec),
+ DM_DRIVER_GET(stm32mp_bsec),
&dev);
if (ret)
return ret;
@@ -601,7 +601,7 @@ static int setup_serial_number(void)
return 0;
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stm32mp_bsec),
+ DM_DRIVER_GET(stm32mp_bsec),
&dev);
if (ret)
return ret;
diff --git a/arch/arm/mach-uniphier/micro-support-card.c b/arch/arm/mach-uniphier/micro-support-card.c
index dbd156ffce..95780f79c2 100644
--- a/arch/arm/mach-uniphier/micro-support-card.c
+++ b/arch/arm/mach-uniphier/micro-support-card.c
@@ -95,7 +95,7 @@ void support_card_init(void)
/* The system bus must be initialized for access to the support card. */
ret = uclass_get_device_by_driver(UCLASS_SIMPLE_BUS,
- DM_GET_DRIVER(uniphier_system_bus_driver),
+ DM_DRIVER_GET(uniphier_system_bus_driver),
&dev);
if (ret)
return;
diff --git a/arch/arm/mach-zynq/clk.c b/arch/arm/mach-zynq/clk.c
index 1ace117fc8..856047613c 100644
--- a/arch/arm/mach-zynq/clk.c
+++ b/arch/arm/mach-zynq/clk.c
@@ -40,7 +40,7 @@ int set_cpu_clk_info(void)
int i, ret;
ret = uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(zynq_clk), &dev);
+ DM_DRIVER_GET(zynq_clk), &dev);
if (ret)
return ret;
@@ -75,7 +75,7 @@ int soc_clk_dump(void)
int i, ret;
ret = uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(zynq_clk), &dev);
+ DM_DRIVER_GET(zynq_clk), &dev);
if (ret)
return ret;
diff --git a/arch/arm/mach-zynq/timer.c b/arch/arm/mach-zynq/timer.c
index cc0e24cbfe..37193157d9 100644
--- a/arch/arm/mach-zynq/timer.c
+++ b/arch/arm/mach-zynq/timer.c
@@ -68,7 +68,7 @@ int timer_init(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(zynq_clk), &dev);
+ DM_DRIVER_GET(zynq_clk), &dev);
if (ret)
return ret;
diff --git a/arch/mips/mach-mtmips/mt7628/init.c b/arch/mips/mach-mtmips/mt7628/init.c
index 77d1f2ea0d..33538647a2 100644
--- a/arch/mips/mach-mtmips/mt7628/init.c
+++ b/arch/mips/mach-mtmips/mt7628/init.c
@@ -74,7 +74,7 @@ int print_cpuinfo(void)
ddr ? "" : "2", chipmode & 0x01 ? 4 : 3,
chipmode & 0x02 ? "XTAL" : "CPLL");
- ret = uclass_get_device_by_driver(UCLASS_CLK, DM_GET_DRIVER(mt7628_clk),
+ ret = uclass_get_device_by_driver(UCLASS_CLK, DM_DRIVER_GET(mt7628_clk),
&clkdev);
if (ret)
return ret;
diff --git a/arch/riscv/lib/sifive_clint.c b/arch/riscv/lib/sifive_clint.c
index c8079dc510..cfa288a01a 100644
--- a/arch/riscv/lib/sifive_clint.c
+++ b/arch/riscv/lib/sifive_clint.c
@@ -25,7 +25,7 @@ int riscv_init_ipi(void)
struct udevice *dev;
ret = uclass_get_device_by_driver(UCLASS_TIMER,
- DM_GET_DRIVER(sifive_clint), &dev);
+ DM_DRIVER_GET(sifive_clint), &dev);
if (ret)
return ret;
diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c
index f42d395098..35669c252b 100644
--- a/board/dhelectronics/dh_stm32mp1/board.c
+++ b/board/dhelectronics/dh_stm32mp1/board.c
@@ -343,7 +343,7 @@ int g_dnl_board_usb_cable_connected(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_USB_GADGET_GENERIC,
- DM_GET_DRIVER(dwc2_udc_otg),
+ DM_DRIVER_GET(dwc2_udc_otg),
&dwc2_udc_otg);
if (!ret)
debug("dwc2_udc_otg init failed\n");
@@ -475,11 +475,11 @@ static void sysconf_init(void)
* but this value need to be consistent with board design
*/
ret = uclass_get_device_by_driver(UCLASS_PMIC,
- DM_GET_DRIVER(stm32mp_pwr_pmic),
+ DM_DRIVER_GET(stm32mp_pwr_pmic),
&pwr_dev);
if (!ret) {
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stm32mp_bsec),
+ DM_DRIVER_GET(stm32mp_bsec),
&dev);
if (ret) {
pr_err("Can't find stm32mp_bsec driver\n");
diff --git a/board/google/gru/gru.c b/board/google/gru/gru.c
index 441a1a376a..23080c1798 100644
--- a/board/google/gru/gru.c
+++ b/board/google/gru/gru.c
@@ -45,7 +45,7 @@ int board_early_init_r(void)
* setting up.
*/
ret = uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(clk_rk3399), &clk);
+ DM_DRIVER_GET(clk_rk3399), &clk);
if (ret) {
debug("%s: CLK init failed: %d\n", __func__, ret);
return ret;
diff --git a/board/nvidia/jetson-tk1/jetson-tk1.c b/board/nvidia/jetson-tk1/jetson-tk1.c
index 9eccdc4a83..d349531261 100644
--- a/board/nvidia/jetson-tk1/jetson-tk1.c
+++ b/board/nvidia/jetson-tk1/jetson-tk1.c
@@ -60,7 +60,7 @@ int tegra_pcie_board_init(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_PMIC,
- DM_GET_DRIVER(pmic_as3722), &dev);
+ DM_DRIVER_GET(pmic_as3722), &dev);
if (ret) {
debug("%s: Failed to find PMIC\n", __func__);
return ret;
diff --git a/board/nvidia/nyan-big/nyan-big.c b/board/nvidia/nyan-big/nyan-big.c
index 71c71ed6ec..06a36f8ed3 100644
--- a/board/nvidia/nyan-big/nyan-big.c
+++ b/board/nvidia/nyan-big/nyan-big.c
@@ -52,7 +52,7 @@ int tegra_lcd_pmic_init(int board_id)
int ret;
ret = uclass_get_device_by_driver(UCLASS_PMIC,
- DM_GET_DRIVER(pmic_as3722), &dev);
+ DM_DRIVER_GET(pmic_as3722), &dev);
if (ret) {
debug("%s: Failed to find PMIC\n", __func__);
return ret;
diff --git a/board/renesas/ulcb/cpld.c b/board/renesas/ulcb/cpld.c
index e3fa3526b7..ebb2d6f742 100644
--- a/board/renesas/ulcb/cpld.c
+++ b/board/renesas/ulcb/cpld.c
@@ -91,7 +91,7 @@ static int do_cpld(struct cmd_tbl *cmdtp, int flag, int argc,
int ret;
ret = uclass_get_device_by_driver(UCLASS_SYSRESET,
- DM_GET_DRIVER(sysreset_renesas_ulcb),
+ DM_DRIVER_GET(sysreset_renesas_ulcb),
&dev);
if (ret)
return ret;
diff --git a/board/sifive/fu540/fu540.c b/board/sifive/fu540/fu540.c
index 54e5a4c167..a4e78220cb 100644
--- a/board/sifive/fu540/fu540.c
+++ b/board/sifive/fu540/fu540.c
@@ -58,7 +58,7 @@ static u32 fu540_read_serialnum(void)
/* init OTP */
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(sifive_otp), &dev);
+ DM_DRIVER_GET(sifive_otp), &dev);
if (ret) {
debug("%s: could not find otp device\n", __func__);
diff --git a/board/st/common/cmd_stboard.c b/board/st/common/cmd_stboard.c
index e1038619f0..2fba383168 100644
--- a/board/st/common/cmd_stboard.c
+++ b/board/st/common/cmd_stboard.c
@@ -85,7 +85,7 @@ static int do_stboard(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_USAGE;
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stm32mp_bsec),
+ DM_DRIVER_GET(stm32mp_bsec),
&dev);
ret = misc_read(dev, STM32_BSEC_OTP(BSEC_OTP_BOARD),
diff --git a/board/st/common/stm32mp_dfu.c b/board/st/common/stm32mp_dfu.c
index aab7d741ac..9c3d115dce 100644
--- a/board/st/common/stm32mp_dfu.c
+++ b/board/st/common/stm32mp_dfu.c
@@ -163,7 +163,7 @@ static int dfu_otp_read(u64 offset, u8 *buffer, long *size)
int ret;
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stm32mp_bsec),
+ DM_DRIVER_GET(stm32mp_bsec),
&dev);
if (ret)
return ret;
@@ -184,7 +184,7 @@ static int dfu_pmic_read(u64 offset, u8 *buffer, long *size)
struct udevice *dev;
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stpmic1_nvm),
+ DM_DRIVER_GET(stpmic1_nvm),
&dev);
if (ret)
return ret;
diff --git a/board/st/common/stpmic1.c b/board/st/common/stpmic1.c
index 3aa379e8a5..a313b817c5 100644
--- a/board/st/common/stpmic1.c
+++ b/board/st/common/stpmic1.c
@@ -20,7 +20,7 @@ int board_ddr_power_init(enum ddr_type ddr_type)
u32 buck2;
ret = uclass_get_device_by_driver(UCLASS_PMIC,
- DM_GET_DRIVER(pmic_stpmic1), &dev);
+ DM_DRIVER_GET(pmic_stpmic1), &dev);
if (ret)
/* No PMIC on board */
return 0;
@@ -187,7 +187,7 @@ void stpmic1_init(u32 voltage_mv)
struct udevice *dev;
if (uclass_get_device_by_driver(UCLASS_PMIC,
- DM_GET_DRIVER(pmic_stpmic1), &dev))
+ DM_DRIVER_GET(pmic_stpmic1), &dev))
return;
/* update VDDCORE = BUCK1 */
diff --git a/board/st/common/stusb160x.c b/board/st/common/stusb160x.c
index f1197f9faa..e0a2b76353 100644
--- a/board/st/common/stusb160x.c
+++ b/board/st/common/stusb160x.c
@@ -22,7 +22,7 @@ int stusb160x_cable_connected(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_I2C_GENERIC,
- DM_GET_DRIVER(stusb160x),
+ DM_DRIVER_GET(stusb160x),
&dev);
if (ret < 0)
return ret;
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 8a3ce0a6f5..08393b27eb 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -116,7 +116,7 @@ int checkboard(void)
/* display the STMicroelectronics board identification */
if (CONFIG_IS_ENABLED(CMD_STBOARD)) {
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stm32mp_bsec),
+ DM_DRIVER_GET(stm32mp_bsec),
&dev);
if (!ret)
ret = misc_read(dev, STM32_BSEC_SHADOW(BSEC_OTP_BOARD),
@@ -196,7 +196,7 @@ int g_dnl_board_usb_cable_connected(void)
return ret;
ret = uclass_get_device_by_driver(UCLASS_USB_GADGET_GENERIC,
- DM_GET_DRIVER(dwc2_udc_otg),
+ DM_DRIVER_GET(dwc2_udc_otg),
&dwc2_udc_otg);
if (!ret)
debug("dwc2_udc_otg init failed\n");
@@ -464,11 +464,11 @@ static void sysconf_init(void)
* but this value need to be consistent with board design
*/
ret = uclass_get_device_by_driver(UCLASS_PMIC,
- DM_GET_DRIVER(stm32mp_pwr_pmic),
+ DM_DRIVER_GET(stm32mp_pwr_pmic),
&pwr_dev);
if (!ret && IS_ENABLED(CONFIG_DM_REGULATOR)) {
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stm32mp_bsec),
+ DM_DRIVER_GET(stm32mp_bsec),
&dev);
if (ret) {
pr_err("Can't find stm32mp_bsec driver\n");
@@ -618,7 +618,7 @@ static void board_ev1_init(void)
struct udevice *dev;
/* configure IRQ line on EV1 for touchscreen before LCD reset */
- uclass_get_device_by_driver(UCLASS_NOP, DM_GET_DRIVER(goodix), &dev);
+ uclass_get_device_by_driver(UCLASS_NOP, DM_DRIVER_GET(goodix), &dev);
}
/* board dependent setup after realloc */
@@ -680,7 +680,7 @@ int board_late_init(void)
}
}
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stm32mp_bsec),
+ DM_DRIVER_GET(stm32mp_bsec),
&dev);
if (!ret)
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index d8711eb900..44969e80b4 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -411,7 +411,7 @@ void spl_board_init(void)
#ifdef CONFIG_ESM_K3
if (board_ti_k3_is("J721EX-PM2-SOM")) {
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(k3_esm), &dev);
+ DM_DRIVER_GET(k3_esm), &dev);
if (ret)
printf("ESM init failed: %d\n", ret);
}
@@ -420,7 +420,7 @@ void spl_board_init(void)
#ifdef CONFIG_ESM_PMIC
if (board_ti_k3_is("J721EX-PM2-SOM")) {
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(pmic_esm),
+ DM_DRIVER_GET(pmic_esm),
&dev);
if (ret)
printf("ESM PMIC init failed: %d\n", ret);
diff --git a/board/toradex/apalis-tk1/apalis-tk1.c b/board/toradex/apalis-tk1/apalis-tk1.c
index e7a2186c2c..b97617cfca 100644
--- a/board/toradex/apalis-tk1/apalis-tk1.c
+++ b/board/toradex/apalis-tk1/apalis-tk1.c
@@ -155,7 +155,7 @@ int tegra_pcie_board_init(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_PMIC,
- DM_GET_DRIVER(pmic_as3722), &dev);
+ DM_DRIVER_GET(pmic_as3722), &dev);
if (ret) {
pr_err("failed to find AS3722 PMIC: %d\n", ret);
return ret;
@@ -194,7 +194,7 @@ void tegra_pcie_board_port_reset(struct tegra_pcie_port *port)
int ret;
ret = uclass_get_device_by_driver(UCLASS_PMIC,
- DM_GET_DRIVER(pmic_as3722),
+ DM_DRIVER_GET(pmic_as3722),
&dev);
if (ret) {
debug("%s: Failed to find PMIC\n", __func__);
diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c
index 72cbcdf6a2..5bea2b60b9 100644
--- a/drivers/clk/clk_stm32mp1.c
+++ b/drivers/clk/clk_stm32mp1.c
@@ -2253,7 +2253,7 @@ int soc_clk_dump(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(stm32mp1_clock),
+ DM_DRIVER_GET(stm32mp1_clock),
&dev);
if (ret)
return ret;
diff --git a/drivers/clk/clk_zynqmp.c b/drivers/clk/clk_zynqmp.c
index a9988d8f1a..e8acca0066 100644
--- a/drivers/clk/clk_zynqmp.c
+++ b/drivers/clk/clk_zynqmp.c
@@ -617,7 +617,7 @@ int soc_clk_dump(void)
int i, ret;
ret = uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(zynqmp_clk), &dev);
+ DM_DRIVER_GET(zynqmp_clk), &dev);
if (ret)
return ret;
diff --git a/drivers/clk/imx/clk-imx8.c b/drivers/clk/imx/clk-imx8.c
index 27a652a625..8484613eed 100644
--- a/drivers/clk/imx/clk-imx8.c
+++ b/drivers/clk/imx/clk-imx8.c
@@ -51,7 +51,7 @@ int soc_clk_dump(void)
int i, ret;
ret = uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(imx8_clk), &dev);
+ DM_DRIVER_GET(imx8_clk), &dev);
if (ret)
return ret;
diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index 388471b03a..d43b8a0648 100644
--- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c
@@ -296,7 +296,7 @@ static ulong mtk_topckgen_get_factor_rate(struct clk *clk, u32 off)
switch (fdiv->flags & CLK_PARENT_MASK) {
case CLK_PARENT_APMIXED:
rate = mtk_clk_find_parent_rate(clk, fdiv->parent,
- DM_GET_DRIVER(mtk_clk_apmixedsys));
+ DM_DRIVER_GET(mtk_clk_apmixedsys));
break;
case CLK_PARENT_TOPCKGEN:
rate = mtk_clk_find_parent_rate(clk, fdiv->parent, NULL);
@@ -474,11 +474,11 @@ static ulong mtk_clk_gate_get_rate(struct clk *clk)
switch (gate->flags & CLK_PARENT_MASK) {
case CLK_PARENT_APMIXED:
return mtk_clk_find_parent_rate(clk, gate->parent,
- DM_GET_DRIVER(mtk_clk_apmixedsys));
+ DM_DRIVER_GET(mtk_clk_apmixedsys));
break;
case CLK_PARENT_TOPCKGEN:
return mtk_clk_find_parent_rate(clk, gate->parent,
- DM_GET_DRIVER(mtk_clk_topckgen));
+ DM_DRIVER_GET(mtk_clk_topckgen));
break;
default:
diff --git a/drivers/clk/sifive/fu540-prci.c b/drivers/clk/sifive/fu540-prci.c
index 9a08c148a0..b3882d0b77 100644
--- a/drivers/clk/sifive/fu540-prci.c
+++ b/drivers/clk/sifive/fu540-prci.c
@@ -537,7 +537,7 @@ static int __prci_consumer_reset(const char *rst_name, bool trigger)
int ret;
ret = uclass_get_device_by_driver(UCLASS_RESET,
- DM_GET_DRIVER(sifive_reset),
+ DM_DRIVER_GET(sifive_reset),
&dev);
if (ret) {
dev_err(dev, "Reset driver not found: %d\n", ret);
diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c b/drivers/firmware/scmi/scmi_agent-uclass.c
index b3d3f0a51b..516e690ac2 100644
--- a/drivers/firmware/scmi/scmi_agent-uclass.c
+++ b/drivers/firmware/scmi/scmi_agent-uclass.c
@@ -73,11 +73,11 @@ static int scmi_bind_protocols(struct udevice *dev)
switch (protocol_id) {
case SCMI_PROTOCOL_ID_CLOCK:
if (IS_ENABLED(CONFIG_CLK_SCMI))
- drv = DM_GET_DRIVER(scmi_clock);
+ drv = DM_DRIVER_GET(scmi_clock);
break;
case SCMI_PROTOCOL_ID_RESET_DOMAIN:
if (IS_ENABLED(CONFIG_RESET_SCMI))
- drv = DM_GET_DRIVER(scmi_reset_domain);
+ drv = DM_DRIVER_GET(scmi_reset_domain);
break;
default:
break;
diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index 952c111b08..bad6b71e0c 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -306,7 +306,7 @@ int gpio_hog_probe_all(void)
for (uclass_first_device(UCLASS_NOP, &dev);
dev;
uclass_find_next_device(&dev)) {
- if (dev->driver == DM_GET_DRIVER(gpio_hog)) {
+ if (dev->driver == DM_DRIVER_GET(gpio_hog)) {
ret = device_probe(dev);
if (ret) {
printf("Failed to probe device %s err: %d\n",
diff --git a/drivers/misc/i2c_eeprom.c b/drivers/misc/i2c_eeprom.c
index 9ffd28f597..5926c91a2e 100644
--- a/drivers/misc/i2c_eeprom.c
+++ b/drivers/misc/i2c_eeprom.c
@@ -131,7 +131,7 @@ static int i2c_eeprom_std_bind(struct udevice *dev)
if (!name)
continue;
- device_bind(dev, DM_GET_DRIVER(i2c_eeprom_partition), name,
+ device_bind(dev, DM_DRIVER_GET(i2c_eeprom_partition), name,
NULL, partition, NULL);
}
diff --git a/drivers/misc/rockchip-efuse.c b/drivers/misc/rockchip-efuse.c
index be25389e0e..083ee65e0a 100644
--- a/drivers/misc/rockchip-efuse.c
+++ b/drivers/misc/rockchip-efuse.c
@@ -58,7 +58,7 @@ static int dump_efuses(struct cmd_tbl *cmdtp, int flag,
/* retrieve the device */
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(rockchip_efuse), &dev);
+ DM_DRIVER_GET(rockchip_efuse), &dev);
if (ret) {
printf("%s: no misc-device found\n", __func__);
return 0;
diff --git a/drivers/misc/stm32mp_fuse.c b/drivers/misc/stm32mp_fuse.c
index 0eed345973..9fd6c367dc 100644
--- a/drivers/misc/stm32mp_fuse.c
+++ b/drivers/misc/stm32mp_fuse.c
@@ -26,7 +26,7 @@ int fuse_read(u32 bank, u32 word, u32 *val)
switch (bank) {
case STM32MP_OTP_BANK:
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stm32mp_bsec),
+ DM_DRIVER_GET(stm32mp_bsec),
&dev);
if (ret)
return ret;
@@ -41,7 +41,7 @@ int fuse_read(u32 bank, u32 word, u32 *val)
#ifdef CONFIG_PMIC_STPMIC1
case STM32MP_NVM_BANK:
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stpmic1_nvm),
+ DM_DRIVER_GET(stpmic1_nvm),
&dev);
if (ret)
return ret;
@@ -71,7 +71,7 @@ int fuse_prog(u32 bank, u32 word, u32 val)
switch (bank) {
case STM32MP_OTP_BANK:
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stm32mp_bsec),
+ DM_DRIVER_GET(stm32mp_bsec),
&dev);
if (ret)
return ret;
@@ -86,7 +86,7 @@ int fuse_prog(u32 bank, u32 word, u32 val)
#ifdef CONFIG_PMIC_STPMIC1
case STM32MP_NVM_BANK:
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stpmic1_nvm),
+ DM_DRIVER_GET(stpmic1_nvm),
&dev);
if (ret)
return ret;
@@ -115,7 +115,7 @@ int fuse_sense(u32 bank, u32 word, u32 *val)
switch (bank) {
case STM32MP_OTP_BANK:
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stm32mp_bsec),
+ DM_DRIVER_GET(stm32mp_bsec),
&dev);
if (ret)
return ret;
@@ -129,7 +129,7 @@ int fuse_sense(u32 bank, u32 word, u32 *val)
#ifdef CONFIG_PMIC_STPMIC1
case STM32MP_NVM_BANK:
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stpmic1_nvm),
+ DM_DRIVER_GET(stpmic1_nvm),
&dev);
if (ret)
return ret;
@@ -159,7 +159,7 @@ int fuse_override(u32 bank, u32 word, u32 val)
switch (bank) {
case STM32MP_OTP_BANK:
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stm32mp_bsec),
+ DM_DRIVER_GET(stm32mp_bsec),
&dev);
if (ret)
return ret;
@@ -174,7 +174,7 @@ int fuse_override(u32 bank, u32 word, u32 val)
#ifdef CONFIG_PMIC_STPMIC1
case STM32MP_NVM_BANK:
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(stpmic1_nvm),
+ DM_DRIVER_GET(stpmic1_nvm),
&dev);
if (ret)
return ret;
diff --git a/drivers/mtd/nand/raw/arasan_nfc.c b/drivers/mtd/nand/raw/arasan_nfc.c
index d4e8f8df87..4621bfb03e 100644
--- a/drivers/mtd/nand/raw/arasan_nfc.c
+++ b/drivers/mtd/nand/raw/arasan_nfc.c
@@ -1319,7 +1319,7 @@ void board_nand_init(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_MTD,
- DM_GET_DRIVER(arasan_nand), &dev);
+ DM_DRIVER_GET(arasan_nand), &dev);
if (ret && ret != -ENODEV)
pr_err("Failed to initialize %s. (error %d)\n", dev->name, ret);
}
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c
index 71682cb6e7..aa095c439b 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c
@@ -118,7 +118,7 @@ void board_nand_init(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_MTD,
- DM_GET_DRIVER(bcm63158_nand), &dev);
+ DM_DRIVER_GET(bcm63158_nand), &dev);
if (ret && ret != -ENODEV)
pr_err("Failed to initialize %s. (error %d)\n", dev->name,
ret);
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c
index f424194ecc..e4bf193681 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c
@@ -111,7 +111,7 @@ void board_nand_init(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_MTD,
- DM_GET_DRIVER(bcm6368_nand), &dev);
+ DM_DRIVER_GET(bcm6368_nand), &dev);
if (ret && ret != -ENODEV)
pr_err("Failed to initialize %s. (error %d)\n", dev->name,
ret);
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c
index 47ddde4f9b..586ea3d8fb 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm68360_nand.c
@@ -117,7 +117,7 @@ void board_nand_init(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_MTD,
- DM_GET_DRIVER(bcm68360_nand), &dev);
+ DM_DRIVER_GET(bcm68360_nand), &dev);
if (ret && ret != -ENODEV)
pr_err("Failed to initialize %s. (error %d)\n", dev->name,
ret);
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c
index 646495096c..85f318bd77 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c
@@ -117,7 +117,7 @@ void board_nand_init(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_MTD,
- DM_GET_DRIVER(bcm6838_nand), &dev);
+ DM_DRIVER_GET(bcm6838_nand), &dev);
if (ret && ret != -ENODEV)
pr_err("Failed to initialize %s. (error %d)\n", dev->name,
ret);
diff --git a/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c
index 7573cd944f..a5e159ad52 100644
--- a/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c
@@ -118,7 +118,7 @@ void board_nand_init(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_MTD,
- DM_GET_DRIVER(bcm6858_nand), &dev);
+ DM_DRIVER_GET(bcm6858_nand), &dev);
if (ret && ret != -ENODEV)
pr_err("Failed to initialize %s. (error %d)\n", dev->name,
ret);
diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c
index 4645cc1699..9ad3a57690 100644
--- a/drivers/mtd/nand/raw/davinci_nand.c
+++ b/drivers/mtd/nand/raw/davinci_nand.c
@@ -825,7 +825,7 @@ void board_nand_init(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_MTD,
- DM_GET_DRIVER(davinci_nand), &dev);
+ DM_DRIVER_GET(davinci_nand), &dev);
if (ret && ret != -ENODEV)
pr_err("Failed to initialize %s: %d\n", dev->name, ret);
}
diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c
index 140ef7f725..cf4df0168a 100644
--- a/drivers/mtd/nand/raw/denali_dt.c
+++ b/drivers/mtd/nand/raw/denali_dt.c
@@ -181,7 +181,7 @@ void board_nand_init(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_MTD,
- DM_GET_DRIVER(denali_nand_dt),
+ DM_DRIVER_GET(denali_nand_dt),
&dev);
if (ret && ret != -ENODEV)
pr_err("Failed to initialize Denali NAND controller. (error %d)\n",
diff --git a/drivers/mtd/nand/raw/mxs_nand_dt.c b/drivers/mtd/nand/raw/mxs_nand_dt.c
index 78a423dbbf..878796d555 100644
--- a/drivers/mtd/nand/raw/mxs_nand_dt.c
+++ b/drivers/mtd/nand/raw/mxs_nand_dt.c
@@ -177,7 +177,7 @@ void board_nand_init(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_MTD,
- DM_GET_DRIVER(mxs_nand_dt),
+ DM_DRIVER_GET(mxs_nand_dt),
&dev);
if (ret && ret != -ENODEV)
pr_err("Failed to initialize MXS NAND controller. (error %d)\n",
diff --git a/drivers/mtd/nand/raw/octeontx_nand.c b/drivers/mtd/nand/raw/octeontx_nand.c
index 64433cf6cc..9997135ef9 100644
--- a/drivers/mtd/nand/raw/octeontx_nand.c
+++ b/drivers/mtd/nand/raw/octeontx_nand.c
@@ -2233,14 +2233,14 @@ void board_nand_init(void)
if (IS_ENABLED(CONFIG_NAND_OCTEONTX_HW_ECC)) {
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(octeontx_pci_bchpf),
+ DM_DRIVER_GET(octeontx_pci_bchpf),
&dev);
if (ret && ret != -ENODEV) {
pr_err("Failed to initialize OcteonTX BCH PF controller. (error %d)\n",
ret);
}
ret = uclass_get_device_by_driver(UCLASS_MISC,
- DM_GET_DRIVER(octeontx_pci_bchvf),
+ DM_DRIVER_GET(octeontx_pci_bchvf),
&dev);
if (ret && ret != -ENODEV) {
pr_err("Failed to initialize OcteonTX BCH VF controller. (error %d)\n",
@@ -2249,7 +2249,7 @@ void board_nand_init(void)
}
ret = uclass_get_device_by_driver(UCLASS_MTD,
- DM_GET_DRIVER(octeontx_pci_nand),
+ DM_DRIVER_GET(octeontx_pci_nand),
&dev);
if (ret && ret != -ENODEV)
pr_err("Failed to initialize OcteonTX NAND controller. (error %d)\n",
diff --git a/drivers/mtd/nand/raw/pxa3xx_nand.c b/drivers/mtd/nand/raw/pxa3xx_nand.c
index e923ce363a..f6233756d8 100644
--- a/drivers/mtd/nand/raw/pxa3xx_nand.c
+++ b/drivers/mtd/nand/raw/pxa3xx_nand.c
@@ -1947,7 +1947,7 @@ void board_nand_init(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_MTD,
- DM_GET_DRIVER(pxa3xx_nand), &dev);
+ DM_DRIVER_GET(pxa3xx_nand), &dev);
if (ret && ret != -ENODEV) {
pr_err("Failed to initialize %s. (error %d)\n", dev->name,
ret);
diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
index 8fe7ec1343..b8561b2516 100644
--- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
+++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
@@ -1042,7 +1042,7 @@ void board_nand_init(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_MTD,
- DM_GET_DRIVER(stm32_fmc2_nfc),
+ DM_DRIVER_GET(stm32_fmc2_nfc),
&dev);
if (ret && ret != -ENODEV)
pr_err("Failed to initialize STM32 FMC2 NFC controller. (error %d)\n",
diff --git a/drivers/mtd/nand/raw/tegra_nand.c b/drivers/mtd/nand/raw/tegra_nand.c
index 797fc23050..a530127cb7 100644
--- a/drivers/mtd/nand/raw/tegra_nand.c
+++ b/drivers/mtd/nand/raw/tegra_nand.c
@@ -999,7 +999,7 @@ void board_nand_init(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_MTD,
- DM_GET_DRIVER(tegra_nand), &dev);
+ DM_DRIVER_GET(tegra_nand), &dev);
if (ret && ret != -ENODEV)
pr_err("Failed to initialize %s. (error %d)\n", dev->name,
ret);
diff --git a/drivers/mtd/nand/raw/vf610_nfc.c b/drivers/mtd/nand/raw/vf610_nfc.c
index 422b9c57a8..e33953ec7c 100644
--- a/drivers/mtd/nand/raw/vf610_nfc.c
+++ b/drivers/mtd/nand/raw/vf610_nfc.c
@@ -794,7 +794,7 @@ void board_nand_init(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_MTD,
- DM_GET_DRIVER(vf610_nfc_dt),
+ DM_DRIVER_GET(vf610_nfc_dt),
&dev);
if (ret && ret != -ENODEV)
pr_err("Failed to initialize NAND controller. (error %d)\n",
diff --git a/drivers/mtd/nand/raw/zynq_nand.c b/drivers/mtd/nand/raw/zynq_nand.c
index 7cf0ccb656..15d4a238e6 100644
--- a/drivers/mtd/nand/raw/zynq_nand.c
+++ b/drivers/mtd/nand/raw/zynq_nand.c
@@ -1295,7 +1295,7 @@ void board_nand_init(void)
int ret;
ret = uclass_get_device_by_driver(UCLASS_MTD,
- DM_GET_DRIVER(zynq_nand), &dev);
+ DM_DRIVER_GET(zynq_nand), &dev);
if (ret && ret != -ENODEV)
pr_err("Failed to initialize %s. (error %d)\n", dev->name, ret);
}
diff --git a/drivers/reset/reset-ast2500.c b/drivers/reset/reset-ast2500.c
index a229d490f3..c3d650fc6b 100644
--- a/drivers/reset/reset-ast2500.c
+++ b/drivers/reset/reset-ast2500.c
@@ -72,7 +72,7 @@ static int ast2500_reset_probe(struct udevice *dev)
/* get SCU base from clock device */
rc = uclass_get_device_by_driver(UCLASS_CLK,
- DM_GET_DRIVER(aspeed_ast2500_scu), &scu_dev);
+ DM_DRIVER_GET(aspeed_ast2500_scu), &scu_dev);
if (rc) {
debug("%s: clock device not found, rc=%d\n", __func__, rc);
return rc;
diff --git a/drivers/video/lg4573.c b/drivers/video/lg4573.c
index abf40bddfb..dd87fc461b 100644
--- a/drivers/video/lg4573.c
+++ b/drivers/video/lg4573.c
@@ -219,7 +219,7 @@ static int do_lgset(struct cmd_tbl *cmdtp, int flag, int argc,
int ret;
ret = uclass_get_device_by_driver(UCLASS_DISPLAY,
- DM_GET_DRIVER(lg4573_lcd), &dev);
+ DM_DRIVER_GET(lg4573_lcd), &dev);
if (ret) {
printf("%s: Could not get lg4573 device\n", __func__);
return ret;
diff --git a/include/dm/device.h b/include/dm/device.h
index e16ba2405f..6899030105 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -335,7 +335,7 @@ struct driver {
ll_entry_declare(struct driver, __name, driver)
/* Get a pointer to a given driver */
-#define DM_GET_DRIVER(__name) \
+#define DM_DRIVER_GET(__name) \
ll_entry_get(struct driver, __name, driver)
/**
diff --git a/include/dm/uclass.h b/include/dm/uclass.h
index f06339e4d6..b5f066dbf4 100644
--- a/include/dm/uclass.h
+++ b/include/dm/uclass.h
@@ -264,7 +264,7 @@ int uclass_get_device_by_phandle(enum uclass_id id, struct udevice *parent,
* uclass_get_device_by_driver() - Get a uclass device for a driver
*
* This searches the devices in the uclass for one that uses the given
- * driver. Use DM_GET_DRIVER(name) for the @drv argument, where 'name' is
+ * driver. Use DM_DRIVER_GET(name) for the @drv argument, where 'name' is
* the driver name - as used in U_BOOT_DRIVER(name).
*
* The device is probed to activate it ready for use.
diff --git a/test/dm/core.c b/test/dm/core.c
index 82b7a668dd..1f5ca570dc 100644
--- a/test/dm/core.c
+++ b/test/dm/core.c
@@ -1052,7 +1052,7 @@ static int dm_test_inactive_child(struct unit_test_state *uts)
*/
ut_asserteq(-ENODEV, device_find_first_inactive_child(parent,
UCLASS_TEST, &dev1));
- ut_assertok(device_bind(parent, DM_GET_DRIVER(test_drv),
+ ut_assertok(device_bind(parent, DM_DRIVER_GET(test_drv),
"test_child", 0, ofnode_null(), &dev1));
ut_assertok(device_find_first_inactive_child(parent, UCLASS_TEST,
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index 711bf20a9c..b53539055b 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -328,7 +328,7 @@ static int dm_test_fdt_uclass_seq_more(struct unit_test_state *uts)
/* Check creating a device with an alias */
node = ofnode_path("/some-bus/c-test@1");
- ut_assertok(device_bind(dm_root(), DM_GET_DRIVER(testfdt_drv),
+ ut_assertok(device_bind(dm_root(), DM_DRIVER_GET(testfdt_drv),
"c-test@1", NULL, node, &dev));
ut_asserteq(12, dev_seq(dev));
ut_assertok(uclass_get_device_by_seq(UCLASS_TEST_FDT, 12, &dev));
@@ -348,11 +348,11 @@ static int dm_test_fdt_uclass_seq_more(struct unit_test_state *uts)
*
* So next available is 19
*/
- ut_assertok(device_bind(dm_root(), DM_GET_DRIVER(testfdt_drv),
+ ut_assertok(device_bind(dm_root(), DM_DRIVER_GET(testfdt_drv),
"fred", NULL, ofnode_null(), &dev));
ut_asserteq(19, dev_seq(dev));
- ut_assertok(device_bind(dm_root(), DM_GET_DRIVER(testfdt_drv),
+ ut_assertok(device_bind(dm_root(), DM_DRIVER_GET(testfdt_drv),
"fred2", NULL, ofnode_null(), &dev));
ut_asserteq(20, dev_seq(dev));