dmaengine: omap-dma: Use pointer to omap_sg in slave_sg setup's loop
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>
This commit is contained in:

committed by
Vinod Koul

parent
3c9b833f5b
commit
cb7958dfa9
@@ -819,9 +819,11 @@ static struct dma_async_tx_descriptor *omap_dma_prep_slave_sg(
|
|||||||
en = burst;
|
en = burst;
|
||||||
frame_bytes = es_bytes[es] * en;
|
frame_bytes = es_bytes[es] * en;
|
||||||
for_each_sg(sgl, sgent, sglen, i) {
|
for_each_sg(sgl, sgent, sglen, i) {
|
||||||
d->sg[i].addr = sg_dma_address(sgent);
|
struct omap_sg *osg = &d->sg[i];
|
||||||
d->sg[i].en = en;
|
|
||||||
d->sg[i].fn = sg_dma_len(sgent) / frame_bytes;
|
osg->addr = sg_dma_address(sgent);
|
||||||
|
osg->en = en;
|
||||||
|
osg->fn = sg_dma_len(sgent) / frame_bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
d->sglen = sglen;
|
d->sglen = sglen;
|
||||||
|
Reference in New Issue
Block a user