Commit 8194fea0 authored by Fabio Estevam's avatar Fabio Estevam Committed by Felipe Balbi

usb: imx_udc.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 1c7f6cd3
...@@ -1432,7 +1432,7 @@ static int __init imx_udc_probe(struct platform_device *pdev) ...@@ -1432,7 +1432,7 @@ static int __init imx_udc_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "can't get USB clock\n"); dev_err(&pdev->dev, "can't get USB clock\n");
goto fail2; goto fail2;
} }
clk_enable(clk); clk_prepare_enable(clk);
if (clk_get_rate(clk) != 48000000) { if (clk_get_rate(clk) != 48000000) {
D_INI(&pdev->dev, D_INI(&pdev->dev,
...@@ -1496,7 +1496,7 @@ static int __init imx_udc_probe(struct platform_device *pdev) ...@@ -1496,7 +1496,7 @@ static int __init imx_udc_probe(struct platform_device *pdev)
free_irq(imx_usb->usbd_int[i], imx_usb); free_irq(imx_usb->usbd_int[i], imx_usb);
fail3: fail3:
clk_put(clk); clk_put(clk);
clk_disable(clk); clk_disable_unprepare(clk);
fail2: fail2:
iounmap(base); iounmap(base);
fail1: fail1:
...@@ -1521,7 +1521,7 @@ static int __exit imx_udc_remove(struct platform_device *pdev) ...@@ -1521,7 +1521,7 @@ static int __exit imx_udc_remove(struct platform_device *pdev)
free_irq(imx_usb->usbd_int[i], imx_usb); free_irq(imx_usb->usbd_int[i], imx_usb);
clk_put(imx_usb->clk); clk_put(imx_usb->clk);
clk_disable(imx_usb->clk); clk_disable_unprepare(imx_usb->clk);
iounmap(imx_usb->base); iounmap(imx_usb->base);
release_mem_region(imx_usb->res->start, resource_size(imx_usb->res)); release_mem_region(imx_usb->res->start, resource_size(imx_usb->res));
......
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