diff options
Diffstat (limited to 'drivers/dma/pch_dma.c')
-rw-r--r-- | drivers/dma/pch_dma.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c index 2b3479d850c9..5218e48aed0e 100644 --- a/drivers/dma/pch_dma.c +++ b/drivers/dma/pch_dma.c | |||
@@ -417,20 +417,6 @@ static void pdc_advance_work(struct pch_dma_chan *pd_chan) | |||
417 | } | 417 | } |
418 | } | 418 | } |
419 | 419 | ||
420 | static dma_cookie_t pdc_assign_cookie(struct pch_dma_chan *pd_chan, | ||
421 | struct pch_dma_desc *desc) | ||
422 | { | ||
423 | dma_cookie_t cookie = pd_chan->chan.cookie; | ||
424 | |||
425 | if (++cookie < 0) | ||
426 | cookie = 1; | ||
427 | |||
428 | pd_chan->chan.cookie = cookie; | ||
429 | desc->txd.cookie = cookie; | ||
430 | |||
431 | return cookie; | ||
432 | } | ||
433 | |||
434 | static dma_cookie_t pd_tx_submit(struct dma_async_tx_descriptor *txd) | 420 | static dma_cookie_t pd_tx_submit(struct dma_async_tx_descriptor *txd) |
435 | { | 421 | { |
436 | struct pch_dma_desc *desc = to_pd_desc(txd); | 422 | struct pch_dma_desc *desc = to_pd_desc(txd); |
@@ -438,7 +424,7 @@ static dma_cookie_t pd_tx_submit(struct dma_async_tx_descriptor *txd) | |||
438 | dma_cookie_t cookie; | 424 | dma_cookie_t cookie; |
439 | 425 | ||
440 | spin_lock(&pd_chan->lock); | 426 | spin_lock(&pd_chan->lock); |
441 | cookie = pdc_assign_cookie(pd_chan, desc); | 427 | cookie = dma_cookie_assign(txd); |
442 | 428 | ||
443 | if (list_empty(&pd_chan->active_list)) { | 429 | if (list_empty(&pd_chan->active_list)) { |
444 | list_add_tail(&desc->desc_node, &pd_chan->active_list); | 430 | list_add_tail(&desc->desc_node, &pd_chan->active_list); |