diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2013-05-27 08:14:41 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-08-05 00:02:25 -0400 |
commit | c14d2bc4709e8d5102a71f222fdd5a2b0c14c669 (patch) | |
tree | d7d88a3db4da42adb172690638a9b6e3fe32fd08 /drivers/dma | |
parent | c6c732cf9ff0547430a9dedc3fcf6a93f4db54ab (diff) |
mmp_tdma: set cookies as well when asked for tx status
dma_set_residue() sets only residue value, so user can't rely on the returned
values of cookies. That patch standardize the behaviour.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/mmp_tdma.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c index 9b9366537d73..a9345d0387d8 100644 --- a/drivers/dma/mmp_tdma.c +++ b/drivers/dma/mmp_tdma.c | |||
@@ -460,7 +460,8 @@ static enum dma_status mmp_tdma_tx_status(struct dma_chan *chan, | |||
460 | { | 460 | { |
461 | struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan); | 461 | struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan); |
462 | 462 | ||
463 | dma_set_residue(txstate, tdmac->buf_len - tdmac->pos); | 463 | dma_set_tx_state(txstate, chan->completed_cookie, chan->cookie, |
464 | tdmac->buf_len - tdmac->pos); | ||
464 | 465 | ||
465 | return tdmac->status; | 466 | return tdmac->status; |
466 | } | 467 | } |