Skip to content

Commit 8194fea

Browse files
Fabio EstevamFelipe Balbi
authored andcommitted
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>
1 parent 1c7f6cd commit 8194fea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/usb/gadget/imx_udc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,7 +1432,7 @@ static int __init imx_udc_probe(struct platform_device *pdev)
14321432
dev_err(&pdev->dev, "can't get USB clock\n");
14331433
goto fail2;
14341434
}
1435-
clk_enable(clk);
1435+
clk_prepare_enable(clk);
14361436

14371437
if (clk_get_rate(clk) != 48000000) {
14381438
D_INI(&pdev->dev,
@@ -1496,7 +1496,7 @@ static int __init imx_udc_probe(struct platform_device *pdev)
14961496
free_irq(imx_usb->usbd_int[i], imx_usb);
14971497
fail3:
14981498
clk_put(clk);
1499-
clk_disable(clk);
1499+
clk_disable_unprepare(clk);
15001500
fail2:
15011501
iounmap(base);
15021502
fail1:
@@ -1521,7 +1521,7 @@ static int __exit imx_udc_remove(struct platform_device *pdev)
15211521
free_irq(imx_usb->usbd_int[i], imx_usb);
15221522

15231523
clk_put(imx_usb->clk);
1524-
clk_disable(imx_usb->clk);
1524+
clk_disable_unprepare(imx_usb->clk);
15251525
iounmap(imx_usb->base);
15261526

15271527
release_mem_region(imx_usb->res->start, resource_size(imx_usb->res));

0 commit comments

Comments
 (0)