* [PATCH 0/2] regulator: even more OF node imbalance fixes
@ 2026-04-07 12:48 Johan Hovold
2026-04-07 12:48 ` [PATCH 1/2] regulator: act8945a: fix OF node reference imbalance Johan Hovold
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Johan Hovold @ 2026-04-07 12:48 UTC (permalink / raw)
To: Mark Brown; +Cc: Liam Girdwood, Marek Vasut, linux-kernel, Johan Hovold
I missed these drivers which probably meant to set config->of_node in my
previous rounds.
Johan
Johan Hovold (2):
regulator: act8945a: fix OF node reference imbalance
regulator: bd9571mwv: fix OF node reference imbalance
drivers/regulator/act8945a-regulator.c | 3 ++-
drivers/regulator/bd9571mwv-regulator.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
--
2.52.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] regulator: act8945a: fix OF node reference imbalance
2026-04-07 12:48 [PATCH 0/2] regulator: even more OF node imbalance fixes Johan Hovold
@ 2026-04-07 12:48 ` Johan Hovold
2026-04-07 12:48 ` [PATCH 2/2] regulator: bd9571mwv: " Johan Hovold
2026-04-07 13:07 ` [PATCH 0/2] regulator: even more OF node imbalance fixes Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: Johan Hovold @ 2026-04-07 12:48 UTC (permalink / raw)
To: Mark Brown
Cc: Liam Girdwood, Marek Vasut, linux-kernel, Johan Hovold, stable,
Wenyou Yang
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.
Fix this by using the intended helper for reusing OF nodes.
Fixes: 38c09961048b ("regulator: act8945a: add regulator driver for ACT8945A")
Cc: stable@vger.kernel.org # 4.6
Cc: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/regulator/act8945a-regulator.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/act8945a-regulator.c b/drivers/regulator/act8945a-regulator.c
index 24cbdd833863..5bbe2bce740e 100644
--- a/drivers/regulator/act8945a-regulator.c
+++ b/drivers/regulator/act8945a-regulator.c
@@ -302,8 +302,9 @@ static int act8945a_pmic_probe(struct platform_device *pdev)
num_regulators = ARRAY_SIZE(act8945a_regulators);
}
+ device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
+
config.dev = &pdev->dev;
- config.dev->of_node = pdev->dev.parent->of_node;
config.driver_data = act8945a;
for (i = 0; i < num_regulators; i++) {
rdev = devm_regulator_register(&pdev->dev, ®ulators[i],
--
2.52.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] regulator: bd9571mwv: fix OF node reference imbalance
2026-04-07 12:48 [PATCH 0/2] regulator: even more OF node imbalance fixes Johan Hovold
2026-04-07 12:48 ` [PATCH 1/2] regulator: act8945a: fix OF node reference imbalance Johan Hovold
@ 2026-04-07 12:48 ` Johan Hovold
2026-04-07 13:07 ` [PATCH 0/2] regulator: even more OF node imbalance fixes Mark Brown
2 siblings, 0 replies; 6+ messages in thread
From: Johan Hovold @ 2026-04-07 12:48 UTC (permalink / raw)
To: Mark Brown
Cc: Liam Girdwood, Marek Vasut, linux-kernel, Johan Hovold, stable,
Marek Vasut
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.
Fix this by using the intended helper for reusing OF nodes.
Fixes: e85c5a153fe2 ("regulator: Add ROHM BD9571MWV-M PMIC regulator driver")
Cc: stable@vger.kernel.org # 4.12
Cc: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/regulator/bd9571mwv-regulator.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/bd9571mwv-regulator.c b/drivers/regulator/bd9571mwv-regulator.c
index 209beabb5c37..f4de24a281b1 100644
--- a/drivers/regulator/bd9571mwv-regulator.c
+++ b/drivers/regulator/bd9571mwv-regulator.c
@@ -287,8 +287,9 @@ static int bd9571mwv_regulator_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, bdreg);
+ device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
+
config.dev = &pdev->dev;
- config.dev->of_node = pdev->dev.parent->of_node;
config.driver_data = bdreg;
config.regmap = bdreg->regmap;
--
2.52.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] regulator: even more OF node imbalance fixes
2026-04-07 12:48 [PATCH 0/2] regulator: even more OF node imbalance fixes Johan Hovold
2026-04-07 12:48 ` [PATCH 1/2] regulator: act8945a: fix OF node reference imbalance Johan Hovold
2026-04-07 12:48 ` [PATCH 2/2] regulator: bd9571mwv: " Johan Hovold
@ 2026-04-07 13:07 ` Mark Brown
2026-04-07 14:52 ` Johan Hovold
2 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2026-04-07 13:07 UTC (permalink / raw)
To: Johan Hovold; +Cc: Liam Girdwood, Marek Vasut, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 334 bytes --]
On Tue, Apr 07, 2026 at 02:48:34PM +0200, Johan Hovold wrote:
> I missed these drivers which probably meant to set config->of_node in my
> previous rounds.
It would be somewhat easier to just send individual patches for all
these things, there's no real interrelationship between the patches
other than the similarity of the issus.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] regulator: even more OF node imbalance fixes
2026-04-07 13:07 ` [PATCH 0/2] regulator: even more OF node imbalance fixes Mark Brown
@ 2026-04-07 14:52 ` Johan Hovold
2026-04-07 14:59 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: Johan Hovold @ 2026-04-07 14:52 UTC (permalink / raw)
To: Mark Brown; +Cc: Liam Girdwood, Marek Vasut, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 591 bytes --]
On Tue, Apr 07, 2026 at 02:07:17PM +0100, Mark Brown wrote:
> On Tue, Apr 07, 2026 at 02:48:34PM +0200, Johan Hovold wrote:
>
> > I missed these drivers which probably meant to set config->of_node in my
> > previous rounds.
>
> It would be somewhat easier to just send individual patches for all
> these things, there's no real interrelationship between the patches
> other than the similarity of the issus.
Possibly in this case, but not if there is any feedback that applies to
all patches in the series.
I assume you don't want me to resend these now, though?
Johan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 265 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] regulator: even more OF node imbalance fixes
2026-04-07 14:52 ` Johan Hovold
@ 2026-04-07 14:59 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2026-04-07 14:59 UTC (permalink / raw)
To: Johan Hovold; +Cc: Liam Girdwood, Marek Vasut, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 576 bytes --]
On Tue, Apr 07, 2026 at 04:52:08PM +0200, Johan Hovold wrote:
> On Tue, Apr 07, 2026 at 02:07:17PM +0100, Mark Brown wrote:
> > It would be somewhat easier to just send individual patches for all
> > these things, there's no real interrelationship between the patches
> > other than the similarity of the issus.
> Possibly in this case, but not if there is any feedback that applies to
> all patches in the series.
Once you're sending multiple similiar followup serieses that
> I assume you don't want me to resend these now, though?
Right, please don't.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-04-07 14:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-07 12:48 [PATCH 0/2] regulator: even more OF node imbalance fixes Johan Hovold
2026-04-07 12:48 ` [PATCH 1/2] regulator: act8945a: fix OF node reference imbalance Johan Hovold
2026-04-07 12:48 ` [PATCH 2/2] regulator: bd9571mwv: " Johan Hovold
2026-04-07 13:07 ` [PATCH 0/2] regulator: even more OF node imbalance fixes Mark Brown
2026-04-07 14:52 ` Johan Hovold
2026-04-07 14:59 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox