diff options
Diffstat (limited to 'drivers/dma/coh901318.c')
-rw-r--r-- | drivers/dma/coh901318.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/drivers/dma/coh901318.c b/drivers/dma/coh901318.c index fb0d1245ade5..843a1a3b8a81 100644 --- a/drivers/dma/coh901318.c +++ b/drivers/dma/coh901318.c | |||
@@ -318,20 +318,6 @@ static int coh901318_prep_linked_list(struct coh901318_chan *cohc, | |||
318 | 318 | ||
319 | return 0; | 319 | return 0; |
320 | } | 320 | } |
321 | static dma_cookie_t | ||
322 | coh901318_assign_cookie(struct coh901318_chan *cohc, | ||
323 | struct coh901318_desc *cohd) | ||
324 | { | ||
325 | dma_cookie_t cookie = cohc->chan.cookie; | ||
326 | |||
327 | if (++cookie < 0) | ||
328 | cookie = 1; | ||
329 | |||
330 | cohc->chan.cookie = cookie; | ||
331 | cohd->desc.cookie = cookie; | ||
332 | |||
333 | return cookie; | ||
334 | } | ||
335 | 321 | ||
336 | static struct coh901318_desc * | 322 | static struct coh901318_desc * |
337 | coh901318_desc_get(struct coh901318_chan *cohc) | 323 | coh901318_desc_get(struct coh901318_chan *cohc) |
@@ -966,16 +952,16 @@ coh901318_tx_submit(struct dma_async_tx_descriptor *tx) | |||
966 | desc); | 952 | desc); |
967 | struct coh901318_chan *cohc = to_coh901318_chan(tx->chan); | 953 | struct coh901318_chan *cohc = to_coh901318_chan(tx->chan); |
968 | unsigned long flags; | 954 | unsigned long flags; |
955 | dma_cookie_t cookie; | ||
969 | 956 | ||
970 | spin_lock_irqsave(&cohc->lock, flags); | 957 | spin_lock_irqsave(&cohc->lock, flags); |
971 | 958 | cookie = dma_cookie_assign(tx); | |
972 | tx->cookie = coh901318_assign_cookie(cohc, cohd); | ||
973 | 959 | ||
974 | coh901318_desc_queue(cohc, cohd); | 960 | coh901318_desc_queue(cohc, cohd); |
975 | 961 | ||
976 | spin_unlock_irqrestore(&cohc->lock, flags); | 962 | spin_unlock_irqrestore(&cohc->lock, flags); |
977 | 963 | ||
978 | return tx->cookie; | 964 | return cookie; |
979 | } | 965 | } |
980 | 966 | ||
981 | static struct dma_async_tx_descriptor * | 967 | static struct dma_async_tx_descriptor * |