aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy/phy-am335x.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-08-11 15:26:04 +0100
committerFelipe Balbi <balbi@ti.com>2013-10-01 09:31:10 -0500
commit4d175f340c9c055482688d2205038413dc7b6f1e (patch)
tree5da0d924d671ffcd059aac014aab990ee499a7f0 /drivers/usb/phy/phy-am335x.c
parentLinux 3.12-rc3 (diff)
downloadlinux-dev-4d175f340c9c055482688d2205038413dc7b6f1e.tar.xz
linux-dev-4d175f340c9c055482688d2205038413dc7b6f1e.zip
usb: phy: nop: Defer clock prepare until PHY init
Since we only enable the PHY clock on init and the PHY init and shutdown does not occur in atomitc context there is no need to prepare the clock before it is enabled. Move the clk_prepare() operations to go along with the enables, allowing the clock to be fully idle when not in use. Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/phy/phy-am335x.c')
-rw-r--r--drivers/usb/phy/phy-am335x.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/phy/phy-am335x.c b/drivers/usb/phy/phy-am335x.c
index c4d614d1f173..f836dc68104c 100644
--- a/drivers/usb/phy/phy-am335x.c
+++ b/drivers/usb/phy/phy-am335x.c
@@ -59,15 +59,14 @@ static int am335x_phy_probe(struct platform_device *pdev)
ret = usb_add_phy_dev(&am_phy->usb_phy_gen.phy);
if (ret)
- goto err_add;
+ return ret;
am_phy->usb_phy_gen.phy.init = am335x_init;
am_phy->usb_phy_gen.phy.shutdown = am335x_shutdown;
platform_set_drvdata(pdev, am_phy);
+
return 0;
-err_add:
- usb_phy_gen_cleanup_phy(&am_phy->usb_phy_gen);
return ret;
}