aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/phy/phy-omap-usb2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
index 2063d542b4e4..34b396146c8a 100644
--- a/drivers/phy/phy-omap-usb2.c
+++ b/drivers/phy/phy-omap-usb2.c
@@ -262,7 +262,6 @@ static int omap_usb2_probe(struct platform_device *pdev)
262 otg->phy = &phy->phy; 262 otg->phy = &phy->phy;
263 263
264 platform_set_drvdata(pdev, phy); 264 platform_set_drvdata(pdev, phy);
265 pm_runtime_enable(phy->dev);
266 265
267 generic_phy = devm_phy_create(phy->dev, &ops, NULL); 266 generic_phy = devm_phy_create(phy->dev, &ops, NULL);
268 if (IS_ERR(generic_phy)) 267 if (IS_ERR(generic_phy))
@@ -270,10 +269,13 @@ static int omap_usb2_probe(struct platform_device *pdev)
270 269
271 phy_set_drvdata(generic_phy, phy); 270 phy_set_drvdata(generic_phy, phy);
272 271
272 pm_runtime_enable(phy->dev);
273 phy_provider = devm_of_phy_provider_register(phy->dev, 273 phy_provider = devm_of_phy_provider_register(phy->dev,
274 of_phy_simple_xlate); 274 of_phy_simple_xlate);
275 if (IS_ERR(phy_provider)) 275 if (IS_ERR(phy_provider)) {
276 pm_runtime_disable(phy->dev);
276 return PTR_ERR(phy_provider); 277 return PTR_ERR(phy_provider);
278 }
277 279
278 phy->wkupclk = devm_clk_get(phy->dev, "wkupclk"); 280 phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
279 if (IS_ERR(phy->wkupclk)) { 281 if (IS_ERR(phy->wkupclk)) {
@@ -317,6 +319,7 @@ static int omap_usb2_remove(struct platform_device *pdev)
317 if (!IS_ERR(phy->optclk)) 319 if (!IS_ERR(phy->optclk))
318 clk_unprepare(phy->optclk); 320 clk_unprepare(phy->optclk);
319 usb_remove_phy(&phy->phy); 321 usb_remove_phy(&phy->phy);
322 pm_runtime_disable(phy->dev);
320 323
321 return 0; 324 return 0;
322} 325}