aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/mv_xor.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/mv_xor.c')
-rw-r--r--drivers/dma/mv_xor.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index ee61778ba8a2..d9810ce3794c 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -536,18 +536,6 @@ retry:
536 return NULL; 536 return NULL;
537} 537}
538 538
539static dma_cookie_t
540mv_desc_assign_cookie(struct mv_xor_chan *mv_chan,
541 struct mv_xor_desc_slot *desc)
542{
543 dma_cookie_t cookie = mv_chan->common.cookie;
544
545 if (++cookie < 0)
546 cookie = 1;
547 mv_chan->common.cookie = desc->async_tx.cookie = cookie;
548 return cookie;
549}
550
551/************************ DMA engine API functions ****************************/ 539/************************ DMA engine API functions ****************************/
552static dma_cookie_t 540static dma_cookie_t
553mv_xor_tx_submit(struct dma_async_tx_descriptor *tx) 541mv_xor_tx_submit(struct dma_async_tx_descriptor *tx)
@@ -565,7 +553,7 @@ mv_xor_tx_submit(struct dma_async_tx_descriptor *tx)
565 grp_start = sw_desc->group_head; 553 grp_start = sw_desc->group_head;
566 554
567 spin_lock_bh(&mv_chan->lock); 555 spin_lock_bh(&mv_chan->lock);
568 cookie = mv_desc_assign_cookie(mv_chan, sw_desc); 556 cookie = dma_cookie_assign(tx);
569 557
570 if (list_empty(&mv_chan->chain)) 558 if (list_empty(&mv_chan->chain))
571 list_splice_init(&sw_desc->tx_list, &mv_chan->chain); 559 list_splice_init(&sw_desc->tx_list, &mv_chan->chain);