Skip to content

Commit 24804ba

Browse files
jhovoldlag-linaro
authored andcommitted
mfd: omap-usb-host: 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: Andreas Kemnade <andreas@kemnade.info> Link: https://patch.msgid.link/20251219110714.23919-1-johan@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
1 parent 27a8ace commit 24804ba

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/mfd/omap-usb-host.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,8 +819,10 @@ static void usbhs_omap_remove(struct platform_device *pdev)
819819
{
820820
pm_runtime_disable(&pdev->dev);
821821

822-
/* remove children */
823-
device_for_each_child(&pdev->dev, NULL, usbhs_omap_remove_child);
822+
if (pdev->dev.of_node)
823+
of_platform_depopulate(&pdev->dev);
824+
else
825+
device_for_each_child(&pdev->dev, NULL, usbhs_omap_remove_child);
824826
}
825827

826828
static const struct dev_pm_ops usbhsomap_dev_pm_ops = {

0 commit comments

Comments
 (0)