From: Johan Hovold <johan@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: "Liam Girdwood" <lgirdwood@gmail.com>,
"Marek Vasut" <marek.vasut+renesas@gmail.com>,
"Bartosz Golaszewski" <brgl@kernel.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"André Draszik" <andre.draszik@linaro.org>,
"Douglas Anderson" <dianders@chromium.org>,
linux-kernel@vger.kernel.org, "Johan Hovold" <johan@kernel.org>,
stable@vger.kernel.org, "Wenyou Yang" <wenyou.yang@atmel.com>
Subject: [PATCH v2 6/7] regulator: act8945a: fix OF node reference imbalance
Date: Wed, 8 Apr 2026 09:30:54 +0200 [thread overview]
Message-ID: <20260408073055.5183-7-johan@kernel.org> (raw)
In-Reply-To: <20260408073055.5183-1-johan@kernel.org>
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
next prev parent reply other threads:[~2026-04-08 7:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 7:30 [PATCH v2 0/7] regulator: fix OF node imbalance on reuse Johan Hovold
2026-04-08 7:30 ` [PATCH v2 1/7] regulator: bq257xx: fix OF node reference imbalance Johan Hovold
2026-04-08 7:30 ` [PATCH v2 2/7] regulator: rk808: " Johan Hovold
2026-04-08 7:30 ` [PATCH v2 3/7] regulator: max77650: " Johan Hovold
2026-04-08 7:30 ` [PATCH v2 4/7] regulator: mt6357: " Johan Hovold
2026-04-08 7:30 ` [PATCH v2 5/7] regulator: s2dos05: " Johan Hovold
2026-04-08 7:30 ` Johan Hovold [this message]
2026-04-08 7:30 ` [PATCH v2 7/7] regulator: bd9571mwv: " Johan Hovold
2026-04-08 16:56 ` [PATCH v2 0/7] regulator: fix OF node imbalance on reuse 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=20260408073055.5183-7-johan@kernel.org \
--to=johan@kernel.org \
--cc=andre.draszik@linaro.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=brgl@kernel.org \
--cc=broonie@kernel.org \
--cc=dianders@chromium.org \
--cc=krzk@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marek.vasut+renesas@gmail.com \
--cc=matthias.bgg@gmail.com \
--cc=stable@vger.kernel.org \
--cc=wenyou.yang@atmel.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