aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2016-07-20 04:50:27 -0400
committerVinod Koul <vinod.koul@intel.com>2016-08-10 13:29:12 -0400
commita5dc3fcac4a29b77e8bd476b8b5242e8f449d3a6 (patch)
treeb5db3811e18755d4a616a0c17af818ac91b57533
parent29b4817d4018df78086157ea3a55c1d9424a7cfc (diff)
dmaengine: omap-dma: Simplify omap_dma_start_sg parameter list
We can drop the (sg)idx parameter for the omap_dma_start_sg() function and increment the sgidx inside of the same function. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/omap-dma.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
index d99ca2b511c4..2fdeb02e81fc 100644
--- a/drivers/dma/omap-dma.c
+++ b/drivers/dma/omap-dma.c
@@ -365,10 +365,9 @@ static void omap_dma_stop(struct omap_chan *c)
365 c->running = false; 365 c->running = false;
366} 366}
367 367
368static void omap_dma_start_sg(struct omap_chan *c, struct omap_desc *d, 368static void omap_dma_start_sg(struct omap_chan *c, struct omap_desc *d)
369 unsigned idx)
370{ 369{
371 struct omap_sg *sg = d->sg + idx; 370 struct omap_sg *sg = d->sg + c->sgidx;
372 unsigned cxsa, cxei, cxfi; 371 unsigned cxsa, cxei, cxfi;
373 372
374 if (d->dir == DMA_DEV_TO_MEM || d->dir == DMA_MEM_TO_MEM) { 373 if (d->dir == DMA_DEV_TO_MEM || d->dir == DMA_MEM_TO_MEM) {
@@ -388,6 +387,7 @@ static void omap_dma_start_sg(struct omap_chan *c, struct omap_desc *d,
388 omap_dma_chan_write(c, CFN, sg->fn); 387 omap_dma_chan_write(c, CFN, sg->fn);
389 388
390 omap_dma_start(c, d); 389 omap_dma_start(c, d);
390 c->sgidx++;
391} 391}
392 392
393static void omap_dma_start_desc(struct omap_chan *c) 393static void omap_dma_start_desc(struct omap_chan *c)
@@ -433,7 +433,7 @@ static void omap_dma_start_desc(struct omap_chan *c)
433 omap_dma_chan_write(c, CSDP, d->csdp); 433 omap_dma_chan_write(c, CSDP, d->csdp);
434 omap_dma_chan_write(c, CLNK_CTRL, d->clnk_ctrl); 434 omap_dma_chan_write(c, CLNK_CTRL, d->clnk_ctrl);
435 435
436 omap_dma_start_sg(c, d, 0); 436 omap_dma_start_sg(c, d);
437} 437}
438 438
439static void omap_dma_callback(int ch, u16 status, void *data) 439static void omap_dma_callback(int ch, u16 status, void *data)
@@ -446,8 +446,8 @@ static void omap_dma_callback(int ch, u16 status, void *data)
446 d = c->desc; 446 d = c->desc;
447 if (d) { 447 if (d) {
448 if (!c->cyclic) { 448 if (!c->cyclic) {
449 if (++c->sgidx < d->sglen) { 449 if (c->sgidx < d->sglen) {
450 omap_dma_start_sg(c, d, c->sgidx); 450 omap_dma_start_sg(c, d);
451 } else { 451 } else {
452 omap_dma_start_desc(c); 452 omap_dma_start_desc(c);
453 vchan_cookie_complete(&d->vd); 453 vchan_cookie_complete(&d->vd);