summaryrefslogtreecommitdiffstats
path: root/drivers/dma/dmaengine.c
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2015-06-25 05:51:43 +0200
committerVinod Koul <vinod.koul@intel.com>2015-06-25 05:51:43 +0200
commit0e0fa66e39db6b2c72dbc0d8975fc2a45533a8eb (patch)
tree1b538ba40d301ba70a645d405e37e74bb5d70119 /drivers/dma/dmaengine.c
parentMerge branch 'topic/core' into for-linus (diff)
parentdmaengine: Add driver for TI DMA crossbar on DRA7x (diff)
downloadlinux-0e0fa66e39db6b2c72dbc0d8975fc2a45533a8eb.tar.xz
linux-0e0fa66e39db6b2c72dbc0d8975fc2a45533a8eb.zip
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)