Skip to content

Commit 7ea07bc

Browse files
jhovoldbroonie
authored andcommitted
regulator: bq257xx: 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: 981dd16 ("regulator: bq257xx: Add bq257xx boost regulator driver") Cc: stable@vger.kernel.org # 6.18 Cc: Chris Morgan <macromorgan@hotmail.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20260408073055.5183-2-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 591cd65 commit 7ea07bc

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/regulator/bq257xx-regulator.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ static int bq257xx_regulator_probe(struct platform_device *pdev)
142142
struct device_node *np = dev->of_node;
143143
struct regulator_config cfg = {};
144144

145-
pdev->dev.of_node = pdev->dev.parent->of_node;
146-
pdev->dev.of_node_reused = true;
145+
device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
147146

148147
pdata = devm_kzalloc(&pdev->dev, sizeof(struct bq257xx_reg_data), GFP_KERNEL);
149148
if (!pdata)

0 commit comments

Comments
 (0)