summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2013-05-24 08:30:16 +0200
committerFelipe Balbi <balbi@ti.com>2013-05-28 21:17:08 +0200
commit022d0547aa8b00ff5035ba6207ebc2c08ea0a51f (patch)
treede28409dd7759796647b345d98020d951ff13c59 /drivers/usb/dwc3
parentusb: dwc3: pci: PHY should be deleted later than dwc3 core (diff)
downloadlinux-022d0547aa8b00ff5035ba6207ebc2c08ea0a51f.tar.xz
linux-022d0547aa8b00ff5035ba6207ebc2c08ea0a51f.zip
usb: dwc3: exynos: PHY should be deleted later than dwc3 core
If the glue layer is removed first (core layer later), it deletes the phy device first, then the core device. But at core's removal, it still uses PHY's resources, it may cause kernel's oops. It is much like the problem Paul Zimmerman reported at: http://marc.info/?l=linux-usb&m=136547502011472&w=2. Besides, it is reasonable the PHY is deleted at last as the controller is the PHY's user. Signed-off-by: Peter Chen <peter.chen@freescale.com> Cc: <stable@vger.kernel.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/dwc3-exynos.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c
index 929e7dd6e58b..8ce9d7fd6cfc 100644
--- a/drivers/usb/dwc3/dwc3-exynos.c
+++ b/drivers/usb/dwc3/dwc3-exynos.c
@@ -164,9 +164,9 @@ static int dwc3_exynos_remove(struct platform_device *pdev)
{
struct dwc3_exynos *exynos = platform_get_drvdata(pdev);
+ device_for_each_child(&pdev->dev, NULL, dwc3_exynos_remove_child);
platform_device_unregister(exynos->usb2_phy);
platform_device_unregister(exynos->usb3_phy);
- device_for_each_child(&pdev->dev, NULL, dwc3_exynos_remove_child);
clk_disable_unprepare(exynos->clk);