public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] regulator: act8945a: fix OF node reference imbalance
       [not found] <20260407124836.2689436-1-johan@kernel.org>
@ 2026-04-07 12:48 ` Johan Hovold
  2026-04-07 12:48 ` [PATCH 2/2] regulator: bd9571mwv: " Johan Hovold
  1 sibling, 0 replies; 2+ 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, &regulators[i],
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] regulator: bd9571mwv: fix OF node reference imbalance
       [not found] <20260407124836.2689436-1-johan@kernel.org>
  2026-04-07 12:48 ` [PATCH 1/2] regulator: act8945a: fix OF node reference imbalance Johan Hovold
@ 2026-04-07 12:48 ` Johan Hovold
  1 sibling, 0 replies; 2+ 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] 2+ messages in thread

end of thread, other threads:[~2026-04-07 12:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260407124836.2689436-1-johan@kernel.org>
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox