Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit debc4849 authored by Vinod Koul's avatar Vinod Koul
Browse files

dmaengine: txx9dmac: 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: default avatarVinod Koul <vinod.koul@intel.com>
parent 1f11e377
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -1165,9 +1165,12 @@ static int txx9dmac_chan_remove(struct platform_device *pdev)
{
	struct txx9dmac_chan *dc = platform_get_drvdata(pdev);


	dma_async_device_unregister(&dc->dma);
	if (dc->irq >= 0)
	if (dc->irq >= 0) {
		devm_free_irq(&pdev->dev, dc->irq, dc);
		tasklet_kill(&dc->tasklet);
	}
	dc->ddev->chan[pdev->id % TXX9_DMA_MAX_NR_CHANNELS] = NULL;
	return 0;
}
@@ -1228,8 +1231,10 @@ static int txx9dmac_remove(struct platform_device *pdev)
	struct txx9dmac_dev *ddev = platform_get_drvdata(pdev);

	txx9dmac_off(ddev);
	if (ddev->irq >= 0)
	if (ddev->irq >= 0) {
		devm_free_irq(&pdev->dev, ddev->irq, ddev);
		tasklet_kill(&ddev->tasklet);
	}
	return 0;
}