[PATCH v1 02/11] arch: arm: meson: use 'meson_sm_call()' in 'meson_sm_pwrdm_set()'

Arseniy Krasnov avkrasnov at salutedevices.com
Wed Mar 19 21:20:36 CET 2025


Use more generic function in 'meson_sm_pwrdm_set()'.

Signed-off-by: Arseniy Krasnov <avkrasnov at salutedevices.com>
---
 arch/arm/mach-meson/sm.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/arch/arm/mach-meson/sm.c b/arch/arm/mach-meson/sm.c
index 53b07e1dfe9..0a781e9c47b 100644
--- a/arch/arm/mach-meson/sm.c
+++ b/arch/arm/mach-meson/sm.c
@@ -249,22 +249,16 @@ static int meson_sm_call(u32 smc, struct pt_regs *regs, s32 *retval)
 
 int meson_sm_pwrdm_set(size_t index, int cmd)
 {
-	struct udevice *dev;
 	struct pt_regs regs = { 0 };
 	int err;
 
-	dev = meson_get_sm_device();
-	if (IS_ERR(dev))
-		return PTR_ERR(dev);
-
 	regs.regs[1] = index;
 	regs.regs[2] = cmd;
 
-	err = sm_call(dev, MESON_SMC_CMD_PWRDM_SET, NULL, &regs);
+	err = meson_sm_call(MESON_SMC_CMD_PWRDM_SET, &regs, NULL);
 	if (err)
 		pr_err("Failed to %s power domain ind=%zu (%d)\n", cmd == PWRDM_ON ?
 				"enable" : "disable", index, err);
-
 	return err;
 }
 
-- 
2.30.1



More information about the U-Boot mailing list