Skip to content

Commit 0d15ce3

Browse files
jhovoldbroonie
authored andcommitted
regulator: act8945a: fix OF node reference imbalance
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: 38c0996 ("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> Link: https://patch.msgid.link/20260408073055.5183-7-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent ebe694d commit 0d15ce3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/regulator/act8945a-regulator.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,9 @@ static int act8945a_pmic_probe(struct platform_device *pdev)
302302
num_regulators = ARRAY_SIZE(act8945a_regulators);
303303
}
304304

305+
device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
306+
305307
config.dev = &pdev->dev;
306-
config.dev->of_node = pdev->dev.parent->of_node;
307308
config.driver_data = act8945a;
308309
for (i = 0; i < num_regulators; i++) {
309310
rdev = devm_regulator_register(&pdev->dev, &regulators[i],

0 commit comments

Comments
 (0)