usb: dwc3: keystone: Fix missing child after rebind
Subsystems (2)
PATCH 1/1 usb: dwc3: keystone: Fix missing child after rebind
Directly unregistering the DWC3 child leaves OF_POPULATED set, preventing its recreation on rebind. Use of_platform_depopulate() to clear the population flags during removal.
Fixes 943befc314ae ("usb: dwc3: add Keystone specific glue layer")
Signed-off-by Felix Gu <[email protected]>
--- drivers/usb/dwc3/dwc3-keystone.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
drivers/usb/dwc3/dwc3-keystone.c +1 -10
@@ -170,15 +170,6 @@ static int kdwc3_probe(struct platform_device *pdev)return error; } -static int kdwc3_remove_core (struct device *dev,void *c) -{ -struct platform_device *pdev =to_platform_device (dev); - -platform_device_unregister (pdev); - -return 0 ; -} -static void kdwc3_remove (struct platform_device *pdev) {struct dwc3_keystone *kdwc =platform_get_drvdata (pdev);
@@ -187,7 +178,7 @@ static void kdwc3_remove(struct platform_device *pdev)if (!of_device_is_compatible (node,"ti,am654-dwc3" ))kdwc3_disable_irqs (kdwc); -device_for_each_child (&pdev->dev,NULL , kdwc3_remove_core); +of_platform_depopulate (&pdev->dev);pm_runtime_put_sync (kdwc->dev);pm_runtime_disable (kdwc->dev);
---
base-commit: adcad7f4e6332cff3d6d7165f41584899f598534
change-id: 20261122-keystone-1-43327f3e1585
Best regards,
Signature · 1 line
Felix Gu <[email protected]>
[email protected]
AI reviewSashiko has reviewed this patch and found no issues.
Quoted 6 lines
Directly unregistering the DWC3 child leaves
OF_POPULATEDset, preventing its recreation on rebind. Useof_platform_depopulate()to clear the population flags during removal.Fixes 943befc314ae ("usb: dwc3: add Keystone specific glue layer")Signed-off-by Felix Gu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1