From: Kory Maincent <kory.maincent@bootlin.com>
To: Bjorn Andersson <andersson@kernel.org>,
Mark Brown <broonie@kernel.org>,
linux-kernel@vger.kernel.org
Cc: Kory Maincent <kory.maincent@bootlin.com>,
thomas.petazzoni@bootlin.com, Liam Girdwood <lgirdwood@gmail.com>
Subject: [PATCH] regulator: core: Fix resolve supply
Date: Wed, 13 Nov 2024 16:36:14 +0100 [thread overview]
Message-ID: <20241113153614.1755825-1-kory.maincent@bootlin.com> (raw)
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@bootlin.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
next reply other threads:[~2024-11-13 15:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 15:36 Kory Maincent [this message]
2024-11-13 16:05 ` Mark Brown
2024-11-13 16:36 ` Kory Maincent
2024-11-14 13:27 ` Mark Brown
2024-11-14 14:36 ` Kory Maincent
2024-11-14 17:24 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241113153614.1755825-1-kory.maincent@bootlin.com \
--to=kory.maincent@bootlin.com \
--cc=andersson@kernel.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®