]> Pileus Git - ~andy/linux/commitdiff
dmaengine: imx-dma: remove unused arg of imxdma_sg_next.
authorJavier Martin <javier.martin@vista-silicon.com>
Thu, 22 Mar 2012 13:54:11 +0000 (14:54 +0100)
committerVinod Koul <vinod.koul@linux.intel.com>
Mon, 26 Mar 2012 06:01:32 +0000 (11:31 +0530)
Since this function is always used with 'desc' as first argument
and 'desc->sg' as second argument, the latter is clearly redundant
and can be removed.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
drivers/dma/imx-dma.c

index 629be353c63a6b5091ca1ed5cb7d7f620a03c0b0..628b0f61ab38fde433b8962b6a57e11ed751772d 100644 (file)
@@ -206,9 +206,10 @@ static int imxdma_hw_chain(struct imxdma_channel *imxdmac)
 /*
  * imxdma_sg_next - prepare next chunk for scatter-gather DMA emulation
  */
-static inline int imxdma_sg_next(struct imxdma_desc *d, struct scatterlist *sg)
+static inline int imxdma_sg_next(struct imxdma_desc *d)
 {
        struct imxdma_channel *imxdmac = to_imxdma_chan(d->desc.chan);
+       struct scatterlist *sg = d->sg;
        unsigned long now;
 
        now = min(d->len, sg->length);
@@ -251,7 +252,7 @@ static void imxdma_enable_hw(struct imxdma_desc *d)
                d->sg = sg_next(d->sg);
                if (d->sg) {
                        u32 tmp;
-                       imxdma_sg_next(d, d->sg);
+                       imxdma_sg_next(d);
                        tmp = imx_dmav1_readl(DMA_CCR(channel));
                        imx_dmav1_writel(tmp | CCR_RPT | CCR_ACRPT,
                                DMA_CCR(channel));
@@ -365,7 +366,7 @@ static void dma_irq_handle_channel(struct imxdma_channel *imxdmac)
                desc->sg = sg_next(desc->sg);
 
                if (desc->sg) {
-                       imxdma_sg_next(desc, desc->sg);
+                       imxdma_sg_next(desc);
 
                        tmp = imx_dmav1_readl(DMA_CCR(chno));
 
@@ -475,7 +476,7 @@ static int imxdma_xfer_desc(struct imxdma_desc *d)
                        return -EINVAL;
                }
 
-               imxdma_sg_next(d, d->sg);
+               imxdma_sg_next(d);
 
                break;
        default: