Skip to content

Commit 2b97fb5

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

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/usb/host/imx21-hcd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,7 @@ static int imx21_remove(struct platform_device *pdev)
18111811
usb_remove_hcd(hcd);
18121812

18131813
if (res != NULL) {
1814-
clk_disable(imx21->clk);
1814+
clk_disable_unprepare(imx21->clk);
18151815
clk_put(imx21->clk);
18161816
iounmap(imx21->regs);
18171817
release_mem_region(res->start, resource_size(res));
@@ -1884,7 +1884,7 @@ static int imx21_probe(struct platform_device *pdev)
18841884
ret = clk_set_rate(imx21->clk, clk_round_rate(imx21->clk, 48000000));
18851885
if (ret)
18861886
goto failed_clock_set;
1887-
ret = clk_enable(imx21->clk);
1887+
ret = clk_prepare_enable(imx21->clk);
18881888
if (ret)
18891889
goto failed_clock_enable;
18901890

@@ -1900,7 +1900,7 @@ static int imx21_probe(struct platform_device *pdev)
19001900
return 0;
19011901

19021902
failed_add_hcd:
1903-
clk_disable(imx21->clk);
1903+
clk_disable_unprepare(imx21->clk);
19041904
failed_clock_enable:
19051905
failed_clock_set:
19061906
clk_put(imx21->clk);

0 commit comments

Comments
 (0)