diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-03-16 17:18:44 +0300 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2017-03-27 08:19:34 +0300 |
commit | a08f2673dde1aaba22c79ed016d5901f1b042401 (patch) | |
tree | 7f1104fd238e5695d4196431034386137abd454f /drivers/dma | |
parent | 4f68b09ea3ed5b9619568625d967569da055f487 (diff) | |
download | linux-a08f2673dde1aaba22c79ed016d5901f1b042401.tar.xz |
dmaengine: cppi41: fix cppi41_dma_tx_status() logic
It makes sense to set residue when channel is in progress. Otherwise it
should be 0 since transfer is completed. Meanwhile this patch doesn't
prevent to set residue value anyway.
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/cppi41.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c index 675de6a27e39..a583c644a7bc 100644 --- a/drivers/dma/cppi41.c +++ b/drivers/dma/cppi41.c @@ -420,11 +420,9 @@ static enum dma_status cppi41_dma_tx_status(struct dma_chan *chan, struct cppi41_channel *c = to_cpp41_chan(chan); enum dma_status ret; - /* lock */ ret = dma_cookie_status(chan, cookie, txstate); - if (txstate && ret == DMA_COMPLETE) - txstate->residue = c->residue; - /* unlock */ + + dma_set_residue(txstate, c->residue); return ret; } |