diff options
| author | Vinod Koul <vinod.koul@intel.com> | 2016-07-04 06:11:25 -0400 |
|---|---|---|
| committer | Vinod Koul <vinod.koul@intel.com> | 2016-07-16 10:49:03 -0400 |
| commit | 144fa37f5b4f9b81dfab79c8d440b4aba8b07fde (patch) | |
| tree | dd3b24267fbaf388eed6915e3f060c2ea981cb34 | |
| parent | 0422e30458d6cd9e8dd27913b6a3a72db47eadab (diff) | |
dmaengine: moxart-dma: 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: Jonas Jensen <jonas.jensen@gmail.com>
| -rw-r--r-- | drivers/dma/moxart-dma.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/dma/moxart-dma.c b/drivers/dma/moxart-dma.c index b3a1d9a22b61..a6e642792e5a 100644 --- a/drivers/dma/moxart-dma.c +++ b/drivers/dma/moxart-dma.c | |||
| @@ -148,6 +148,7 @@ struct moxart_chan { | |||
| 148 | struct moxart_dmadev { | 148 | struct moxart_dmadev { |
| 149 | struct dma_device dma_slave; | 149 | struct dma_device dma_slave; |
| 150 | struct moxart_chan slave_chans[APB_DMA_MAX_CHANNEL]; | 150 | struct moxart_chan slave_chans[APB_DMA_MAX_CHANNEL]; |
| 151 | unsigned int irq; | ||
| 151 | }; | 152 | }; |
| 152 | 153 | ||
| 153 | struct moxart_filter_data { | 154 | struct moxart_filter_data { |
| @@ -615,6 +616,7 @@ static int moxart_probe(struct platform_device *pdev) | |||
| 615 | dev_err(dev, "devm_request_irq failed\n"); | 616 | dev_err(dev, "devm_request_irq failed\n"); |
| 616 | return ret; | 617 | return ret; |
| 617 | } | 618 | } |
| 619 | mdc->irq = irq; | ||
| 618 | 620 | ||
| 619 | ret = dma_async_device_register(&mdc->dma_slave); | 621 | ret = dma_async_device_register(&mdc->dma_slave); |
| 620 | if (ret) { | 622 | if (ret) { |
| @@ -638,6 +640,8 @@ static int moxart_remove(struct platform_device *pdev) | |||
| 638 | { | 640 | { |
| 639 | struct moxart_dmadev *m = platform_get_drvdata(pdev); | 641 | struct moxart_dmadev *m = platform_get_drvdata(pdev); |
| 640 | 642 | ||
| 643 | devm_free_irq(&pdev->dev, m->irq, m); | ||
| 644 | |||
| 641 | dma_async_device_unregister(&m->dma_slave); | 645 | dma_async_device_unregister(&m->dma_slave); |
| 642 | 646 | ||
| 643 | if (pdev->dev.of_node) | 647 | if (pdev->dev.of_node) |
