aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2012-05-25 19:14:54 -0400
committerFelipe Balbi <balbi@ti.com>2012-06-12 06:30:59 -0400
commit8194fea0fc308a7cdfc9333584d69cb5d428d47f (patch)
tree7d892cb0e714eb2a2d4768af02f255cadf19f354 /drivers/usb/gadget
parent1c7f6cd3f97b038e875094a8433e239f03d10955 (diff)
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: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/imx_udc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c
index 54034f84f992..dc5334856afe 100644
--- a/drivers/usb/gadget/imx_udc.c
+++ b/drivers/usb/gadget/imx_udc.c
@@ -1432,7 +1432,7 @@ static int __init imx_udc_probe(struct platform_device *pdev)
1432 dev_err(&pdev->dev, "can't get USB clock\n"); 1432 dev_err(&pdev->dev, "can't get USB clock\n");
1433 goto fail2; 1433 goto fail2;
1434 } 1434 }
1435 clk_enable(clk); 1435 clk_prepare_enable(clk);
1436 1436
1437 if (clk_get_rate(clk) != 48000000) { 1437 if (clk_get_rate(clk) != 48000000) {
1438 D_INI(&pdev->dev, 1438 D_INI(&pdev->dev,
@@ -1496,7 +1496,7 @@ fail4:
1496 free_irq(imx_usb->usbd_int[i], imx_usb); 1496 free_irq(imx_usb->usbd_int[i], imx_usb);
1497fail3: 1497fail3:
1498 clk_put(clk); 1498 clk_put(clk);
1499 clk_disable(clk); 1499 clk_disable_unprepare(clk);
1500fail2: 1500fail2:
1501 iounmap(base); 1501 iounmap(base);
1502fail1: 1502fail1:
@@ -1521,7 +1521,7 @@ static int __exit imx_udc_remove(struct platform_device *pdev)
1521 free_irq(imx_usb->usbd_int[i], imx_usb); 1521 free_irq(imx_usb->usbd_int[i], imx_usb);
1522 1522
1523 clk_put(imx_usb->clk); 1523 clk_put(imx_usb->clk);
1524 clk_disable(imx_usb->clk); 1524 clk_disable_unprepare(imx_usb->clk);
1525 iounmap(imx_usb->base); 1525 iounmap(imx_usb->base);
1526 1526
1527 release_mem_region(imx_usb->res->start, resource_size(imx_usb->res)); 1527 release_mem_region(imx_usb->res->start, resource_size(imx_usb->res));