public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: omap-usb-host: fix OF populate on driver rebind
@ 2025-12-19 11:07 Johan Hovold
  2025-12-29 15:04 ` Andreas Kemnade
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Johan Hovold @ 2025-12-19 11:07 UTC (permalink / raw)
  To: Lee Jones
  Cc: Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
	Tony Lindgren, linux-omap, linux-kernel, Johan Hovold, stable

Since commit c6e126de43e7 ("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: c6e126de43e7 ("of: Keep track of populated platform devices")
Cc: stable@vger.kernel.org	# 3.16
Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/mfd/omap-usb-host.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index a77b6fc790f2..4d29a6e2ed87 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -819,8 +819,10 @@ static void usbhs_omap_remove(struct platform_device *pdev)
 {
 	pm_runtime_disable(&pdev->dev);
 
-	/* remove children */
-	device_for_each_child(&pdev->dev, NULL, usbhs_omap_remove_child);
+	if (pdev->dev.of_node)
+		of_platform_depopulate(&pdev->dev);
+	else
+		device_for_each_child(&pdev->dev, NULL, usbhs_omap_remove_child);
 }
 
 static const struct dev_pm_ops usbhsomap_dev_pm_ops = {
-- 
2.51.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-01-20 15:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-19 11:07 [PATCH] mfd: omap-usb-host: fix OF populate on driver rebind Johan Hovold
2025-12-29 15:04 ` Andreas Kemnade
2026-01-09 16:37 ` Lee Jones
2026-01-09 16:39   ` Lee Jones
2026-01-09 17:18     ` Andreas Kemnade
2026-01-09 17:37       ` Andreas Kemnade
2026-01-09 17:49         ` Lee Jones
2026-01-09 17:43       ` Lee Jones
2026-01-13  9:37   ` Johan Hovold
2026-01-20 15:10 ` (subset) " Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox