1
0
Fork 0

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>
hifive-unleashed-5.1
Andy Shevchenko 2013-05-27 15:14:41 +03:00 committed by Vinod Koul
parent c6c732cf9f
commit c14d2bc470
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}