usb: imx21-hcd.c: Use clk_prepare_enable/clk_disable_unprepare
authorFabio Estevam <fabio.estevam@freescale.com>
Fri, 25 May 2012 23:14:55 +0000 (20:14 -0300)
committerFelipe Balbi <balbi@ti.com>
Tue, 12 Jun 2012 10:31:03 +0000 (13:31 +0300)
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>
drivers/usb/host/imx21-hcd.c

index ff471c1c165ed0977c2d0175abed4cfe509f8674..f19e2690c232d555d68e4cad62e9dc7da1206c13 100644 (file)
@@ -1811,7 +1811,7 @@ static int imx21_remove(struct platform_device *pdev)
        usb_remove_hcd(hcd);
 
        if (res != NULL) {
-               clk_disable(imx21->clk);
+               clk_disable_unprepare(imx21->clk);
                clk_put(imx21->clk);
                iounmap(imx21->regs);
                release_mem_region(res->start, resource_size(res));
@@ -1884,7 +1884,7 @@ static int imx21_probe(struct platform_device *pdev)
        ret = clk_set_rate(imx21->clk, clk_round_rate(imx21->clk, 48000000));
        if (ret)
                goto failed_clock_set;
-       ret = clk_enable(imx21->clk);
+       ret = clk_prepare_enable(imx21->clk);
        if (ret)
                goto failed_clock_enable;
 
@@ -1900,7 +1900,7 @@ static int imx21_probe(struct platform_device *pdev)
        return 0;
 
 failed_add_hcd:
-       clk_disable(imx21->clk);
+       clk_disable_unprepare(imx21->clk);
 failed_clock_enable:
 failed_clock_set:
        clk_put(imx21->clk);