aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/imx21-hcd.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2012-05-25 19:14:55 -0400
committerFelipe Balbi <balbi@ti.com>2012-06-12 06:31:03 -0400
commit2b97fb5a605635684f757080cdc405d8173838d5 (patch)
treef7f27ca7e0a919de38fd4f9786afd923882f11d2 /drivers/usb/host/imx21-hcd.c
parent8194fea0fc308a7cdfc9333584d69cb5d428d47f (diff)
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: 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/host/imx21-hcd.c')
-rw-r--r--drivers/usb/host/imx21-hcd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/host/imx21-hcd.c b/drivers/usb/host/imx21-hcd.c
index ff471c1c165e..f19e2690c232 100644
--- a/drivers/usb/host/imx21-hcd.c
+++ b/drivers/usb/host/imx21-hcd.c
@@ -1811,7 +1811,7 @@ static int imx21_remove(struct platform_device *pdev)
1811 usb_remove_hcd(hcd); 1811 usb_remove_hcd(hcd);
1812 1812
1813 if (res != NULL) { 1813 if (res != NULL) {
1814 clk_disable(imx21->clk); 1814 clk_disable_unprepare(imx21->clk);
1815 clk_put(imx21->clk); 1815 clk_put(imx21->clk);
1816 iounmap(imx21->regs); 1816 iounmap(imx21->regs);
1817 release_mem_region(res->start, resource_size(res)); 1817 release_mem_region(res->start, resource_size(res));
@@ -1884,7 +1884,7 @@ static int imx21_probe(struct platform_device *pdev)
1884 ret = clk_set_rate(imx21->clk, clk_round_rate(imx21->clk, 48000000)); 1884 ret = clk_set_rate(imx21->clk, clk_round_rate(imx21->clk, 48000000));
1885 if (ret) 1885 if (ret)
1886 goto failed_clock_set; 1886 goto failed_clock_set;
1887 ret = clk_enable(imx21->clk); 1887 ret = clk_prepare_enable(imx21->clk);
1888 if (ret) 1888 if (ret)
1889 goto failed_clock_enable; 1889 goto failed_clock_enable;
1890 1890
@@ -1900,7 +1900,7 @@ static int imx21_probe(struct platform_device *pdev)
1900 return 0; 1900 return 0;
1901 1901
1902failed_add_hcd: 1902failed_add_hcd:
1903 clk_disable(imx21->clk); 1903 clk_disable_unprepare(imx21->clk);
1904failed_clock_enable: 1904failed_clock_enable:
1905failed_clock_set: 1905failed_clock_set:
1906 clk_put(imx21->clk); 1906 clk_put(imx21->clk);