summaryrefslogtreecommitdiff
path: root/drivers/dma/dmaengine.c
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2015-06-25 06:51:43 +0300
committerVinod Koul <vinod.koul@intel.com>2015-06-25 06:51:43 +0300
commit0e0fa66e39db6b2c72dbc0d8975fc2a45533a8eb (patch)
tree1b538ba40d301ba70a645d405e37e74bb5d70119 /drivers/dma/dmaengine.c
parent9324fdf5267b12f6db660fe52e882bbfffcc109a (diff)
parenta074ae38f859b90bd259f5df43784834b44412d1 (diff)
downloadlinux-0e0fa66e39db6b2c72dbc0d8975fc2a45533a8eb.tar.xz
Merge branch 'topic/omap' into for-linus
Diffstat (limited to 'drivers/dma/dmaengine.c')
-rw-r--r--drivers/dma/dmaengine.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index c0793818bb99..052a2bd1a5cf 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -267,6 +267,13 @@ static void dma_chan_put(struct dma_chan *chan)
/* This channel is not in use anymore, free it */
if (!chan->client_count && chan->device->device_free_chan_resources)
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) {
+ chan->router->route_free(chan->router->dev, chan->route_data);
+ chan->router = NULL;
+ chan->route_data = NULL;
+ }
}
enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie)