summaryrefslogtreecommitdiff
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
parent7c7b680fa6b0866af2c4876da261bbfe710315d6 (diff)
parentb1d6ab1aa8cdc23b89bcd578ea8d5e3c501a13d9 (diff)
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) {