]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
dmaengine: omap-dma: Use pointer to omap_sg in slave_sg setup's loop
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Wed, 20 Jul 2016 08:50:31 +0000 (11:50 +0300)
committerVinod Koul <vinod.koul@intel.com>
Wed, 10 Aug 2016 17:29:12 +0000 (22:59 +0530)
Instead of accessing the array via index, take the pointer first and use
it to set up the omap_sg struct.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/omap-dma.c

index e58eda5640608ae51065e5019f05eac42484640f..6e8e28955ca66b397df69071d034ad7291228410 100644 (file)
@@ -819,9 +819,11 @@ static struct dma_async_tx_descriptor *omap_dma_prep_slave_sg(
        en = burst;
        frame_bytes = es_bytes[es] * en;
        for_each_sg(sgl, sgent, sglen, i) {
-               d->sg[i].addr = sg_dma_address(sgent);
-               d->sg[i].en = en;
-               d->sg[i].fn = sg_dma_len(sgent) / frame_bytes;
+               struct omap_sg *osg = &d->sg[i];
+
+               osg->addr = sg_dma_address(sgent);
+               osg->en = en;
+               osg->fn = sg_dma_len(sgent) / frame_bytes;
        }
 
        d->sglen = sglen;