summaryrefslogtreecommitdiff
path: root/drivers/dma/mmp_tdma.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2013-05-27 15:14:41 +0300
committerVinod Koul <vinod.koul@intel.com>2013-08-05 09:32:25 +0530
commitc14d2bc4709e8d5102a71f222fdd5a2b0c14c669 (patch)
treed7d88a3db4da42adb172690638a9b6e3fe32fd08 /drivers/dma/mmp_tdma.c
parentc6c732cf9ff0547430a9dedc3fcf6a93f4db54ab (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/mmp_tdma.c')
-rw-r--r--drivers/dma/mmp_tdma.c3
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,
{
struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
- dma_set_residue(txstate, tdmac->buf_len - tdmac->pos);
+ dma_set_tx_state(txstate, chan->completed_cookie, chan->cookie,
+ tdmac->buf_len - tdmac->pos);
return tdmac->status;
}