summaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorLothar Waßmann <LW@KARO-electronics.de>2011-12-08 09:15:42 +0100
committerVinod Koul <vinod.koul@linux.intel.com>2011-12-23 20:54:54 +0530
commitfeb397de65c3f76e40ef70e264f2cdf688c850c1 (patch)
treec4f47467c4c05782b40d5cf47550220b19ecae72 /drivers/dma
parent400312201b0cf4e4deaf75842f5e95212b382e81 (diff)
downloadblackbird-op-linux-feb397de65c3f76e40ef70e264f2cdf688c850c1.tar.gz
blackbird-op-linux-feb397de65c3f76e40ef70e264f2cdf688c850c1.zip
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.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c
index d04662e94467..b0e6ac3e09aa 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;
}
OpenPOWER on IntegriCloud