Skip to content

Commit

Permalink
rtc: imx dryice: Add missing clk_prepare
Browse files Browse the repository at this point in the history
prepare the clock before enabling it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
  • Loading branch information
Sascha Hauer committed Apr 25, 2012
1 parent 4fa030a commit 4ec8c7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/rtc/rtc-imxdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ static int dryice_rtc_probe(struct platform_device *pdev)
imxdi->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(imxdi->clk))
return PTR_ERR(imxdi->clk);
clk_enable(imxdi->clk);
clk_prepare_enable(imxdi->clk);

/*
* Initialize dryice hardware
Expand Down Expand Up @@ -470,7 +470,7 @@ static int dryice_rtc_probe(struct platform_device *pdev)
return 0;

err:
clk_disable(imxdi->clk);
clk_disable_unprepare(imxdi->clk);
clk_put(imxdi->clk);

return rc;
Expand All @@ -487,7 +487,7 @@ static int __devexit dryice_rtc_remove(struct platform_device *pdev)

rtc_device_unregister(imxdi->rtc);

clk_disable(imxdi->clk);
clk_disable_unprepare(imxdi->clk);
clk_put(imxdi->clk);

return 0;
Expand Down

0 comments on commit 4ec8c7f

Please sign in to comment.