Skip to content

Commit

Permalink
mmc: mxs-mmc: convert to clk_prepare/clk_unprepare
Browse files Browse the repository at this point in the history
The patch converts mxs-mmc driver to clk_prepare/clk_unprepare by
using helper functions clk_prepare_enable/clk_disable_unprepare.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Chris Ball <cjb@laptop.org>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
  • Loading branch information
Shawn Guo committed Dec 28, 2011
1 parent 759a2e3 commit efdfc52
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/mmc/host/mxs-mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
ret = PTR_ERR(host->clk);
goto out_iounmap;
}
clk_enable(host->clk);
clk_prepare_enable(host->clk);

mxs_mmc_reset(host);

Expand Down Expand Up @@ -772,7 +772,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
if (host->dmach)
dma_release_channel(host->dmach);
out_clk_put:
clk_disable(host->clk);
clk_disable_unprepare(host->clk);
clk_put(host->clk);
out_iounmap:
iounmap(host->base);
Expand All @@ -798,7 +798,7 @@ static int mxs_mmc_remove(struct platform_device *pdev)
if (host->dmach)
dma_release_channel(host->dmach);

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

iounmap(host->base);
Expand All @@ -819,7 +819,7 @@ static int mxs_mmc_suspend(struct device *dev)

ret = mmc_suspend_host(mmc);

clk_disable(host->clk);
clk_disable_unprepare(host->clk);

return ret;
}
Expand All @@ -830,7 +830,7 @@ static int mxs_mmc_resume(struct device *dev)
struct mxs_mmc_host *host = mmc_priv(mmc);
int ret = 0;

clk_enable(host->clk);
clk_prepare_enable(host->clk);

ret = mmc_resume_host(mmc);

Expand Down

0 comments on commit efdfc52

Please sign in to comment.