Skip to content

Commit 27a8ace

Browse files
jhovoldlag-linaro
authored andcommitted
mfd: qcom-pm8xxx: Fix OF populate on driver rebind
Since commit c6e126d ("of: Keep track of populated platform devices") child devices will not be created by of_platform_populate() if the devices had previously been deregistered individually so that the OF_POPULATED flag is still set in the corresponding OF nodes. Switch to using of_platform_depopulate() instead of open coding so that the child devices are created if the driver is rebound. Fixes: c6e126d ("of: Keep track of populated platform devices") Cc: stable@vger.kernel.org # 3.16 Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://patch.msgid.link/20251219110947.24101-1-johan@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
1 parent 42e4a9a commit 27a8ace

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

drivers/mfd/qcom-pm8xxx.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -577,17 +577,11 @@ static int pm8xxx_probe(struct platform_device *pdev)
577577
return rc;
578578
}
579579

580-
static int pm8xxx_remove_child(struct device *dev, void *unused)
581-
{
582-
platform_device_unregister(to_platform_device(dev));
583-
return 0;
584-
}
585-
586580
static void pm8xxx_remove(struct platform_device *pdev)
587581
{
588582
struct pm_irq_chip *chip = platform_get_drvdata(pdev);
589583

590-
device_for_each_child(&pdev->dev, NULL, pm8xxx_remove_child);
584+
of_platform_depopulate(&pdev->dev);
591585
irq_domain_remove(chip->irqdomain);
592586
}
593587

0 commit comments

Comments
 (0)