]> git.karo-electronics.de Git - linux-beck.git/commitdiff
dma: mxs-dma: Always leave mxs_dma_init() with the clock disabled.
authorLothar Waßmann <LW@KARO-electronics.de>
Thu, 8 Dec 2011 08:15:42 +0000 (09:15 +0100)
committerVinod Koul <vinod.koul@linux.intel.com>
Fri, 23 Dec 2011 15:24:54 +0000 (20:54 +0530)
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>
drivers/dma/mxs-dma.c

index d04662e94467450dee573f603d50ee08afded15b..b0e6ac3e09aa16f35b14e0860b2ec7446aa70615 100644 (file)
@@ -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;
 }