aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/s3c24xx-dma.c
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2016-07-05 02:11:23 -0400
committerVinod Koul <vinod.koul@intel.com>2016-07-23 06:37:23 -0400
commit9200ebd8b23a32381e3647a4d326b07561e5d222 (patch)
tree5047b3e1a03454b6440dfc0798510d032b550686 /drivers/dma/s3c24xx-dma.c
parent46cf94d6ab38420690d890d9922bfc61a7b3e2c5 (diff)
dmaengine: s3c24xx: 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> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Diffstat (limited to 'drivers/dma/s3c24xx-dma.c')
-rw-r--r--drivers/dma/s3c24xx-dma.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/dma/s3c24xx-dma.c b/drivers/dma/s3c24xx-dma.c
index 0d2d187646f4..163d95f339e6 100644
--- a/drivers/dma/s3c24xx-dma.c
+++ b/drivers/dma/s3c24xx-dma.c
@@ -1359,6 +1359,18 @@ err_memcpy:
1359 return ret; 1359 return ret;
1360} 1360}
1361 1361
1362static void s3c24xx_dma_free_irq(struct platform_device *pdev,
1363 struct s3c24xx_dma_engine *s3cdma)
1364{
1365 int i;
1366
1367 for (i = 0; i < s3cdma->pdata->num_phy_channels; i++) {
1368 struct s3c24xx_dma_phy *phy = &s3cdma->phy_chans[i];
1369
1370 devm_free_irq(&pdev->dev, phy->irq, phy);
1371 }
1372}
1373
1362static int s3c24xx_dma_remove(struct platform_device *pdev) 1374static int s3c24xx_dma_remove(struct platform_device *pdev)
1363{ 1375{
1364 const struct s3c24xx_dma_platdata *pdata = dev_get_platdata(&pdev->dev); 1376 const struct s3c24xx_dma_platdata *pdata = dev_get_platdata(&pdev->dev);
@@ -1369,6 +1381,8 @@ static int s3c24xx_dma_remove(struct platform_device *pdev)
1369 dma_async_device_unregister(&s3cdma->slave); 1381 dma_async_device_unregister(&s3cdma->slave);
1370 dma_async_device_unregister(&s3cdma->memcpy); 1382 dma_async_device_unregister(&s3cdma->memcpy);
1371 1383
1384 s3c24xx_dma_free_irq(pdev, s3cdma);
1385
1372 s3c24xx_dma_free_virtual_channels(&s3cdma->slave); 1386 s3c24xx_dma_free_virtual_channels(&s3cdma->slave);
1373 s3c24xx_dma_free_virtual_channels(&s3cdma->memcpy); 1387 s3c24xx_dma_free_virtual_channels(&s3cdma->memcpy);
1374 1388