Commit 2b97fb5a authored by Fabio Estevam's avatar Fabio Estevam Committed by Felipe Balbi

usb: imx21-hcd.c: Use clk_prepare_enable/clk_disable_unprepare

Prepare the clock before enabling it.

Cc: <linux-usb@vger.kernel.org>
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Acked-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 8194fea0
...@@ -1811,7 +1811,7 @@ static int imx21_remove(struct platform_device *pdev) ...@@ -1811,7 +1811,7 @@ static int imx21_remove(struct platform_device *pdev)
usb_remove_hcd(hcd); usb_remove_hcd(hcd);
if (res != NULL) { if (res != NULL) {
clk_disable(imx21->clk); clk_disable_unprepare(imx21->clk);
clk_put(imx21->clk); clk_put(imx21->clk);
iounmap(imx21->regs); iounmap(imx21->regs);
release_mem_region(res->start, resource_size(res)); release_mem_region(res->start, resource_size(res));
...@@ -1884,7 +1884,7 @@ static int imx21_probe(struct platform_device *pdev) ...@@ -1884,7 +1884,7 @@ static int imx21_probe(struct platform_device *pdev)
ret = clk_set_rate(imx21->clk, clk_round_rate(imx21->clk, 48000000)); ret = clk_set_rate(imx21->clk, clk_round_rate(imx21->clk, 48000000));
if (ret) if (ret)
goto failed_clock_set; goto failed_clock_set;
ret = clk_enable(imx21->clk); ret = clk_prepare_enable(imx21->clk);
if (ret) if (ret)
goto failed_clock_enable; goto failed_clock_enable;
...@@ -1900,7 +1900,7 @@ static int imx21_probe(struct platform_device *pdev) ...@@ -1900,7 +1900,7 @@ static int imx21_probe(struct platform_device *pdev)
return 0; return 0;
failed_add_hcd: failed_add_hcd:
clk_disable(imx21->clk); clk_disable_unprepare(imx21->clk);
failed_clock_enable: failed_clock_enable:
failed_clock_set: failed_clock_set:
clk_put(imx21->clk); clk_put(imx21->clk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment