mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-28 11:49:32 +00:00
usb: musb: ux500: use clk_prepare_enable and clk_disable_unprepare
This patch converts the module to use clk_prepare_enable and clk_disable_unprepare variants as required by common clock framework. Without this the system crash during probe function. Cc: <stable@vger.kernel.org> # v3.7 v3.8 Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
f278628193
commit
99d17cfa3b
1 changed files with 5 additions and 5 deletions
|
@ -108,7 +108,7 @@ static int ux500_probe(struct platform_device *pdev)
|
||||||
goto err3;
|
goto err3;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = clk_enable(clk);
|
ret = clk_prepare_enable(clk);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "failed to enable clock\n");
|
dev_err(&pdev->dev, "failed to enable clock\n");
|
||||||
goto err4;
|
goto err4;
|
||||||
|
@ -148,7 +148,7 @@ static int ux500_probe(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err5:
|
err5:
|
||||||
clk_disable(clk);
|
clk_disable_unprepare(clk);
|
||||||
|
|
||||||
err4:
|
err4:
|
||||||
clk_put(clk);
|
clk_put(clk);
|
||||||
|
@ -168,7 +168,7 @@ static int ux500_remove(struct platform_device *pdev)
|
||||||
struct ux500_glue *glue = platform_get_drvdata(pdev);
|
struct ux500_glue *glue = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
platform_device_unregister(glue->musb);
|
platform_device_unregister(glue->musb);
|
||||||
clk_disable(glue->clk);
|
clk_disable_unprepare(glue->clk);
|
||||||
clk_put(glue->clk);
|
clk_put(glue->clk);
|
||||||
kfree(glue);
|
kfree(glue);
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ static int ux500_suspend(struct device *dev)
|
||||||
struct musb *musb = glue_to_musb(glue);
|
struct musb *musb = glue_to_musb(glue);
|
||||||
|
|
||||||
usb_phy_set_suspend(musb->xceiv, 1);
|
usb_phy_set_suspend(musb->xceiv, 1);
|
||||||
clk_disable(glue->clk);
|
clk_disable_unprepare(glue->clk);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -193,7 +193,7 @@ static int ux500_resume(struct device *dev)
|
||||||
struct musb *musb = glue_to_musb(glue);
|
struct musb *musb = glue_to_musb(glue);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = clk_enable(glue->clk);
|
ret = clk_prepare_enable(glue->clk);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "failed to enable clock\n");
|
dev_err(dev, "failed to enable clock\n");
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue