summaryrefslogtreecommitdiff
path: root/drivers/usb/phy/phy-am335x.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-08-11 14:26:04 (GMT)
committerFelipe Balbi <balbi@ti.com>2013-10-01 14:31:10 (GMT)
commit4d175f340c9c055482688d2205038413dc7b6f1e (patch)
tree5da0d924d671ffcd059aac014aab990ee499a7f0 /drivers/usb/phy/phy-am335x.c
parent15c03dd4859ab16f9212238f29dd315654aa94f6 (diff)
downloadlinux-4d175f340c9c055482688d2205038413dc7b6f1e.tar.xz
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 c4d614d..f836dc6 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;
}