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

Arseniy Krasnov <[email protected]>
Newsgroups io.groups.u-boot-amlogic,org.u-boot-project.lists.u-boot
Message-ID <[email protected]>
Use more generic function in 'meson_sm_pwrdm_set()'.

Signed-off-by: Arseniy Krasnov <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.