diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2011-12-20 13:54:00 +0800 |
---|---|---|
committer | Huang Shijie <b32955@freescale.com> | 2012-01-31 15:30:47 +0800 |
commit | 35b7bc8417c8a1bc6ed8e7bad2c1ea7607fc89b0 (patch) | |
tree | ebc42bd4394dc18c3fa8d8d59d16bc831ed3a3be /drivers | |
parent | 578053916236e1fa1b74f3f79ea16b5144800488 (diff) |
dma: mxs-dma: convert to clk_prepare/clk_unprepare
The patch converts mxs-dma 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>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/mxs-dma.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c index 2b4ad8aeb50d..b06cd4ca626f 100644 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2012 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved. * * Refer to drivers/dma/imx-sdma.c * @@ -311,7 +311,7 @@ static int mxs_dma_alloc_chan_resources(struct dma_chan *chan) goto err_irq; } - ret = clk_enable(mxs_dma->clk); + ret = clk_prepare_enable(mxs_dma->clk); if (ret) goto err_clk; @@ -346,7 +346,7 @@ static void mxs_dma_free_chan_resources(struct dma_chan *chan) dma_free_coherent(mxs_dma->dma_device.dev, PAGE_SIZE, mxs_chan->ccw, mxs_chan->ccw_phys); - clk_disable(mxs_dma->clk); + clk_disable_unprepare(mxs_dma->clk); } static struct dma_async_tx_descriptor *mxs_dma_prep_slave_sg( @@ -554,7 +554,7 @@ static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma) { int ret; - ret = clk_enable(mxs_dma->clk); + ret = clk_prepare_enable(mxs_dma->clk); if (ret) return ret; @@ -581,7 +581,7 @@ static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma) mxs_dma->base + HW_APBHX_CTRL1 + MXS_SET_ADDR); err_out: - clk_disable(mxs_dma->clk); + clk_disable_unprepare(mxs_dma->clk); return ret; } |