]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/dma/dmaengine.c
Merge branch 'topic/omap' into for-linus
[karo-tx-linux.git] / drivers / dma / dmaengine.c
index c0793818bb9939a8b62a7315cb9f0831d41e7e09..052a2bd1a5cf64948590f903844f1a91a21a96e1 100644 (file)
@@ -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)