Linux 3.17-rc5
[firefly-linux-kernel-4.4.55.git] / drivers / usb / dwc3 / dwc3-omap.c
index 9dcfbe7cd5f5d5cfc58239ee578cd68cae09a63f..fc0de3753648187ab9f1fd68ac121a83cd808e91 100644 (file)
@@ -576,9 +576,9 @@ static int dwc3_omap_remove(struct platform_device *pdev)
        if (omap->extcon_id_dev.edev)
                extcon_unregister_interest(&omap->extcon_id_dev);
        dwc3_omap_disable_irqs(omap);
+       device_for_each_child(&pdev->dev, NULL, dwc3_omap_remove_core);
        pm_runtime_put_sync(&pdev->dev);
        pm_runtime_disable(&pdev->dev);
-       device_for_each_child(&pdev->dev, NULL, dwc3_omap_remove_core);
 
        return 0;
 }