diff options
author | Vinod Koul <vinod.koul@intel.com> | 2016-07-01 08:04:14 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-07-16 10:48:59 -0400 |
commit | 476c7c809ebeefb83e017be543922dede1c10584 (patch) | |
tree | aa4eca5cc7f918d80c86cc318b645b9b37731330 /drivers/dma | |
parent | f4e0628ba37aa4bf2989f912c1f63e3ad1a46704 (diff) |
dmaengine: fsl-edma: 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: Jingchang Lu <b35083@freescale.com>
Cc: Peter Griffin <peter.griffin@linaro.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/fsl-edma.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/dma/fsl-edma.c b/drivers/dma/fsl-edma.c index cc06eeaef1a7..d797a3cea88a 100644 --- a/drivers/dma/fsl-edma.c +++ b/drivers/dma/fsl-edma.c | |||
@@ -852,6 +852,17 @@ fsl_edma_irq_init(struct platform_device *pdev, struct fsl_edma_engine *fsl_edma | |||
852 | return 0; | 852 | return 0; |
853 | } | 853 | } |
854 | 854 | ||
855 | static void fsl_edma_irq_exit( | ||
856 | struct platform_device *pdev, struct fsl_edma_engine *fsl_edma) | ||
857 | { | ||
858 | if (fsl_edma->txirq == fsl_edma->errirq) { | ||
859 | devm_free_irq(&pdev->dev, fsl_edma->txirq, fsl_edma); | ||
860 | } else { | ||
861 | devm_free_irq(&pdev->dev, fsl_edma->txirq, fsl_edma); | ||
862 | devm_free_irq(&pdev->dev, fsl_edma->errirq, fsl_edma); | ||
863 | } | ||
864 | } | ||
865 | |||
855 | static void fsl_disable_clocks(struct fsl_edma_engine *fsl_edma) | 866 | static void fsl_disable_clocks(struct fsl_edma_engine *fsl_edma) |
856 | { | 867 | { |
857 | int i; | 868 | int i; |
@@ -989,6 +1000,7 @@ static int fsl_edma_remove(struct platform_device *pdev) | |||
989 | struct device_node *np = pdev->dev.of_node; | 1000 | struct device_node *np = pdev->dev.of_node; |
990 | struct fsl_edma_engine *fsl_edma = platform_get_drvdata(pdev); | 1001 | struct fsl_edma_engine *fsl_edma = platform_get_drvdata(pdev); |
991 | 1002 | ||
1003 | fsl_edma_irq_exit(pdev, fsl_edma); | ||
992 | of_dma_controller_free(np); | 1004 | of_dma_controller_free(np); |
993 | dma_async_device_unregister(&fsl_edma->dma_dev); | 1005 | dma_async_device_unregister(&fsl_edma->dma_dev); |
994 | fsl_disable_clocks(fsl_edma); | 1006 | fsl_disable_clocks(fsl_edma); |