From 30b4881d6ea4b5be8e3e53c16314b76783e502d6 Mon Sep 17 00:00:00 2001 From: Jishnu Prakash Date: Wed, 19 Aug 2020 18:56:31 +0530 Subject: [PATCH] regulator: rpm-smd: Correct proxy regulator registration Correct the device passed for registering a proxy consumer supply in the regulator device probe. Change-Id: I33028648b66b922cb1132fd87ca8aa2be1b02799 Signed-off-by: Jishnu Prakash --- drivers/regulator/rpm-smd-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/rpm-smd-regulator.c b/drivers/regulator/rpm-smd-regulator.c index 1c0412e6b47c..185d25846c00 100644 --- a/drivers/regulator/rpm-smd-regulator.c +++ b/drivers/regulator/rpm-smd-regulator.c @@ -1316,7 +1316,7 @@ static int rpm_vreg_device_remove(struct platform_device *pdev) rpm_vreg = reg->rpm_vreg; rpm_vreg_lock(rpm_vreg); regulator_unregister(reg->rdev); - devm_regulator_proxy_consumer_unregister(dev); + devm_regulator_proxy_consumer_unregister(pdev->dev.parent); list_del(®->list); kfree(reg); rpm_vreg_unlock(rpm_vreg); @@ -1646,7 +1646,7 @@ static int rpm_vreg_device_probe(struct platform_device *pdev) goto fail_remove_from_list; } - rc = devm_regulator_proxy_consumer_register(dev, node); + rc = devm_regulator_proxy_consumer_register(pdev->dev.parent, node); if (rc) vreg_err(reg, "failed to register proxy consumer, rc=%d\n", rc);