aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2016-07-02 14:30:55 -0400
committerVinod Koul <vinod.koul@intel.com>2016-07-16 10:49:02 -0400
commit5bb9dbb5ae0931fa3c6780a45f651755266f9b6d (patch)
tree381151747520b46e52e9c21f57c750b90c180258 /drivers/dma
parent71c6b663492c5da78c94d3405c0e8044b8290d00 (diff)
dmaengine: imx-sdma: explicitly freeup irq
dmaengine device should explicitly call devm_free_irq() when using devm_request_irq(). The irq is still ON when devices remove is executed and irq should be quiesced before remove is completed. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Fabio Estevam <fabio.estevam@freescale.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/imx-sdma.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index ce865f68a8c7..18bcf556a652 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -386,6 +386,7 @@ struct sdma_engine {
386 const struct sdma_driver_data *drvdata; 386 const struct sdma_driver_data *drvdata;
387 u32 spba_start_addr; 387 u32 spba_start_addr;
388 u32 spba_end_addr; 388 u32 spba_end_addr;
389 unsigned int irq;
389}; 390};
390 391
391static struct sdma_driver_data sdma_imx31 = { 392static struct sdma_driver_data sdma_imx31 = {
@@ -1708,6 +1709,8 @@ static int sdma_probe(struct platform_device *pdev)
1708 if (ret) 1709 if (ret)
1709 return ret; 1710 return ret;
1710 1711
1712 sdma->irq = irq;
1713
1711 sdma->script_addrs = kzalloc(sizeof(*sdma->script_addrs), GFP_KERNEL); 1714 sdma->script_addrs = kzalloc(sizeof(*sdma->script_addrs), GFP_KERNEL);
1712 if (!sdma->script_addrs) 1715 if (!sdma->script_addrs)
1713 return -ENOMEM; 1716 return -ENOMEM;
@@ -1833,6 +1836,7 @@ static int sdma_remove(struct platform_device *pdev)
1833 struct sdma_engine *sdma = platform_get_drvdata(pdev); 1836 struct sdma_engine *sdma = platform_get_drvdata(pdev);
1834 int i; 1837 int i;
1835 1838
1839 devm_free_irq(&pdev->dev, sdma->irq, sdma);
1836 dma_async_device_unregister(&sdma->dma_device); 1840 dma_async_device_unregister(&sdma->dma_device);
1837 kfree(sdma->script_addrs); 1841 kfree(sdma->script_addrs);
1838 /* Kill the tasklet */ 1842 /* Kill the tasklet */