diff options
author | Vinod Koul <vinod.koul@intel.com> | 2016-07-02 18:30:55 (GMT) |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-07-16 14:49:02 (GMT) |
commit | 5bb9dbb5ae0931fa3c6780a45f651755266f9b6d (patch) | |
tree | 381151747520b46e52e9c21f57c750b90c180258 /drivers/dma/imx-sdma.c | |
parent | 71c6b663492c5da78c94d3405c0e8044b8290d00 (diff) | |
download | linux-5bb9dbb5ae0931fa3c6780a45f651755266f9b6d.tar.xz |
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/imx-sdma.c')
-rw-r--r-- | drivers/dma/imx-sdma.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index ce865f6..18bcf55 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -386,6 +386,7 @@ struct sdma_engine { const struct sdma_driver_data *drvdata; u32 spba_start_addr; u32 spba_end_addr; + unsigned int irq; }; static struct sdma_driver_data sdma_imx31 = { @@ -1708,6 +1709,8 @@ static int sdma_probe(struct platform_device *pdev) if (ret) return ret; + sdma->irq = irq; + sdma->script_addrs = kzalloc(sizeof(*sdma->script_addrs), GFP_KERNEL); if (!sdma->script_addrs) return -ENOMEM; @@ -1833,6 +1836,7 @@ static int sdma_remove(struct platform_device *pdev) struct sdma_engine *sdma = platform_get_drvdata(pdev); int i; + devm_free_irq(&pdev->dev, sdma->irq, sdma); dma_async_device_unregister(&sdma->dma_device); kfree(sdma->script_addrs); /* Kill the tasklet */ |