diff options
author | Lothar Waßmann <LW@KARO-electronics.de> | 2011-12-08 09:15:42 +0100 |
---|---|---|
committer | Huang Shijie <b32955@freescale.com> | 2012-01-31 15:19:30 +0800 |
commit | 0a42b8a447c7e2a4562d0e63b7d9297e8262f7bd (patch) | |
tree | 0e6ad96affd5791b924d6c927d4aa843ae954d88 /drivers/dma | |
parent | 796c448a22d7c20c26a9baaf762e83b1cbf1cd0a (diff) |
dma: mxs-dma: Always leave mxs_dma_init() with the clock disabled.
There is no need to have the clock enabled all the time the driver is
loaded.
It will be enabled anyway in mxs_dma_alloc_chan_resources() when a
channel is actually going to be used.
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/mxs-dma.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c index c13687aaa597..365e7ac569e9 100644 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c @@ -580,7 +580,7 @@ static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma) ret = clk_enable(mxs_dma->clk); if (ret) - goto err_out; + return ret; ret = mxs_reset_block(mxs_dma->base); if (ret) @@ -604,11 +604,8 @@ static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma) writel(MXS_DMA_CHANNELS_MASK << MXS_DMA_CHANNELS, mxs_dma->base + HW_APBHX_CTRL1 + MXS_SET_ADDR); - clk_disable(mxs_dma->clk); - - return 0; - err_out: + clk_disable(mxs_dma->clk); return ret; } |