summaryrefslogtreecommitdiff
path: root/drivers/dma/shdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/shdma.c')
-rw-r--r--drivers/dma/shdma.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c
index 17901083ae6e..bead807f01ca 100644
--- a/drivers/dma/shdma.c
+++ b/drivers/dma/shdma.c
@@ -270,13 +270,7 @@ static dma_cookie_t sh_dmae_tx_submit(struct dma_async_tx_descriptor *tx)
spin_lock_bh(&sh_chan->desc_lock);
- cookie = sh_chan->common.cookie;
- cookie++;
- if (cookie < 0)
- cookie = 1;
-
- sh_chan->common.cookie = cookie;
- tx->cookie = cookie;
+ cookie = dma_cookie_assign(tx);
/* Mark all chunks of this descriptor as submitted, move to the queue */
list_for_each_entry_safe(chunk, c, desc->node.prev, node) {