From: Andy Shevchenko Date: Mon, 27 May 2013 12:14:41 +0000 (+0300) Subject: mmp_tdma: set cookies as well when asked for tx status X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c14d2bc4709e8d5102a71f222fdd5a2b0c14c669;p=linux-beck.git 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 Signed-off-by: Vinod Koul --- 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; }