[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241113153614.1755825-1-kory.maincent@bootlin.com>
Date: Wed, 13 Nov 2024 16:36:14 +0100
From: Kory Maincent <kory.maincent@...tlin.com>
To: Bjorn Andersson <andersson@...nel.org>,
Mark Brown <broonie@...nel.org>,
linux-kernel@...r.kernel.org
Cc: Kory Maincent <kory.maincent@...tlin.com>,
thomas.petazzoni@...tlin.com,
Liam Girdwood <lgirdwood@...il.com>
Subject: [PATCH] regulator: core: Fix resolve supply
The regulator should not use the device parent to resolve the regulator
supply. It fails to resolve the correct supply when the of_node
variable in the regulator_config structure is not within the parent
node.
Fixes: 6261b06de565 ("regulator: Defer lookup of supply to regulator_get")
Signed-off-by: Kory Maincent <kory.maincent@...tlin.com>
---
It is weird that it wasn't seen before, maybe there was not any case
were it can't find the supply_name from the parent device.
---
drivers/regulator/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 76d3cd5ae6ea..ee5bc070b5bb 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2023,7 +2023,7 @@ static struct regulator_dev *regulator_dev_lookup(struct device *dev,
static int regulator_resolve_supply(struct regulator_dev *rdev)
{
struct regulator_dev *r;
- struct device *dev = rdev->dev.parent;
+ struct device *dev = &rdev->dev;
struct ww_acquire_ctx ww_ctx;
int ret = 0;
--
2.34.1
Powered by blists - more mailing lists