“db7f37de2c8346c33cf9279fa9d8e8316e8d821c”上不存在“arch/powerpc/include/asm/sparsemem.h”
提交 9200ebd8 编写于 作者: V Vinod Koul

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: NVinod Koul <vinod.koul@intel.com>
Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
上级 46cf94d6
...@@ -1359,6 +1359,18 @@ static int s3c24xx_dma_probe(struct platform_device *pdev) ...@@ -1359,6 +1359,18 @@ static int s3c24xx_dma_probe(struct platform_device *pdev)
return ret; return ret;
} }
static void s3c24xx_dma_free_irq(struct platform_device *pdev,
struct s3c24xx_dma_engine *s3cdma)
{
int i;
for (i = 0; i < s3cdma->pdata->num_phy_channels; i++) {
struct s3c24xx_dma_phy *phy = &s3cdma->phy_chans[i];
devm_free_irq(&pdev->dev, phy->irq, phy);
}
}
static int s3c24xx_dma_remove(struct platform_device *pdev) static int s3c24xx_dma_remove(struct platform_device *pdev)
{ {
const struct s3c24xx_dma_platdata *pdata = dev_get_platdata(&pdev->dev); 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,6 +1381,8 @@ static int s3c24xx_dma_remove(struct platform_device *pdev)
dma_async_device_unregister(&s3cdma->slave); dma_async_device_unregister(&s3cdma->slave);
dma_async_device_unregister(&s3cdma->memcpy); dma_async_device_unregister(&s3cdma->memcpy);
s3c24xx_dma_free_irq(pdev, s3cdma);
s3c24xx_dma_free_virtual_channels(&s3cdma->slave); s3c24xx_dma_free_virtual_channels(&s3cdma->slave);
s3c24xx_dma_free_virtual_channels(&s3cdma->memcpy); s3c24xx_dma_free_virtual_channels(&s3cdma->memcpy);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册