aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/dmaengine.c
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2016-01-06 15:17:47 +0530
committerVinod Koul <vinod.koul@intel.com>2016-01-06 15:17:47 +0530
commitd3f1e93ce8e00be19711c35f0c67c54a58aea559 (patch)
tree58010cdfa4fc473fc0693410b4a444755c4438c9 /drivers/dma/dmaengine.c
parentMerge branch 'topic/univ_api' into for-linus (diff)
parentdmaengine: Add might_sleep() to dmaengine_synchronize() (diff)
downloadlinux-dev-d3f1e93ce8e00be19711c35f0c67c54a58aea559.tar.xz
linux-dev-d3f1e93ce8e00be19711c35f0c67c54a58aea559.zip
Merge branch 'topic/async' into for-linus
Diffstat (limited to 'drivers/dma/dmaengine.c')
-rw-r--r--drivers/dma/dmaengine.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 21c8c0bce3af..c50a247be2e0 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -266,8 +266,11 @@ static void dma_chan_put(struct dma_chan *chan)
module_put(dma_chan_to_owner(chan));
/* This channel is not in use anymore, free it */
- if (!chan->client_count && chan->device->device_free_chan_resources)
+ if (!chan->client_count && chan->device->device_free_chan_resources) {
+ /* Make sure all operations have completed */
+ dmaengine_synchronize(chan);
chan->device->device_free_chan_resources(chan);
+ }
/* If the channel is used via a DMA request router, free the mapping */
if (chan->router && chan->router->route_free) {