aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ste_dma40.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/ste_dma40.c')
-rw-r--r--drivers/dma/ste_dma40.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 156b98f661a3..23e2edc4afd4 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -1220,21 +1220,14 @@ static dma_cookie_t d40_tx_submit(struct dma_async_tx_descriptor *tx)
1220 chan); 1220 chan);
1221 struct d40_desc *d40d = container_of(tx, struct d40_desc, txd); 1221 struct d40_desc *d40d = container_of(tx, struct d40_desc, txd);
1222 unsigned long flags; 1222 unsigned long flags;
1223 dma_cookie_t cookie;
1223 1224
1224 spin_lock_irqsave(&d40c->lock, flags); 1225 spin_lock_irqsave(&d40c->lock, flags);
1225 1226 cookie = dma_cookie_assign(tx);
1226 d40c->chan.cookie++;
1227
1228 if (d40c->chan.cookie < 0)
1229 d40c->chan.cookie = 1;
1230
1231 d40d->txd.cookie = d40c->chan.cookie;
1232
1233 d40_desc_queue(d40c, d40d); 1227 d40_desc_queue(d40c, d40d);
1234
1235 spin_unlock_irqrestore(&d40c->lock, flags); 1228 spin_unlock_irqrestore(&d40c->lock, flags);
1236 1229
1237 return tx->cookie; 1230 return cookie;
1238} 1231}
1239 1232
1240static int d40_start(struct d40_chan *d40c) 1233static int d40_start(struct d40_chan *d40c)