aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHanna Hawa <hannah@marvell.com>2018-07-17 06:29:59 -0400
committerVinod Koul <vkoul@kernel.org>2018-07-20 05:31:58 -0400
commit48c008b5914f9bca44fccce103627bcf39928f95 (patch)
treeba665513a2da7a83c80ab2bb593266069aa83048
parentce397d215ccd07b8ae3f71db689aedb85d56ab40 (diff)
dmaengine: mv_xor_v2: 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: Hanna Hawa <hannah@marvell.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r--drivers/dma/mv_xor_v2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/dma/mv_xor_v2.c b/drivers/dma/mv_xor_v2.c
index c6589ccf1b9a..e16083af9de9 100644
--- a/drivers/dma/mv_xor_v2.c
+++ b/drivers/dma/mv_xor_v2.c
@@ -174,6 +174,7 @@ struct mv_xor_v2_device {
174 int desc_size; 174 int desc_size;
175 unsigned int npendings; 175 unsigned int npendings;
176 unsigned int hw_queue_idx; 176 unsigned int hw_queue_idx;
177 struct msi_desc *msi_desc;
177}; 178};
178 179
179/** 180/**
@@ -780,6 +781,7 @@ static int mv_xor_v2_probe(struct platform_device *pdev)
780 msi_desc = first_msi_entry(&pdev->dev); 781 msi_desc = first_msi_entry(&pdev->dev);
781 if (!msi_desc) 782 if (!msi_desc)
782 goto free_msi_irqs; 783 goto free_msi_irqs;
784 xor_dev->msi_desc = msi_desc;
783 785
784 ret = devm_request_irq(&pdev->dev, msi_desc->irq, 786 ret = devm_request_irq(&pdev->dev, msi_desc->irq,
785 mv_xor_v2_interrupt_handler, 0, 787 mv_xor_v2_interrupt_handler, 0,
@@ -897,6 +899,8 @@ static int mv_xor_v2_remove(struct platform_device *pdev)
897 xor_dev->desc_size * MV_XOR_V2_DESC_NUM, 899 xor_dev->desc_size * MV_XOR_V2_DESC_NUM,
898 xor_dev->hw_desq_virt, xor_dev->hw_desq); 900 xor_dev->hw_desq_virt, xor_dev->hw_desq);
899 901
902 devm_free_irq(&pdev->dev, xor_dev->msi_desc->irq, xor_dev);
903
900 platform_msi_domain_free_irqs(&pdev->dev); 904 platform_msi_domain_free_irqs(&pdev->dev);
901 905
902 clk_disable_unprepare(xor_dev->clk); 906 clk_disable_unprepare(xor_dev->clk);