Skip to content

Commit

Permalink
usb: dwc3: exynos: PHY should be deleted later than dwc3 core
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Chen authored and Felipe Balbi committed May 28, 2013
1 parent f28c42c commit 022d054
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/dwc3/dwc3-exynos.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 022d054

Please sign in to comment.