mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vignesh Raman <Vignesh_Raman@mentor.com>
To: <vinod.koul@intel.com>, <dan.j.williams@intel.com>,
	<dmaengine@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <Jiada_Wang@mentor.com>
Subject: [PATCH v2 2/2] dma: imx-sdma: Adding tasklet_kill() in sdma_remove function.
Date: Tue, 5 Aug 2014 18:39:42 +0530	[thread overview]
Message-ID: <1407244182-27302-3-git-send-email-Vignesh_Raman@mentor.com> (raw)
In-Reply-To: <1407244182-27302-1-git-send-email-Vignesh_Raman@mentor.com>

Several dma drivers calls tasklet_kill() in remove function. This is done
because all running tasklets should be killed on remove. This is missing
in imx sdma driver, so adding tasklet_kill() in sdma_remove function.

Signed-off-by: Vignesh Raman <Vignesh_Raman@mentor.com>
---
 drivers/dma/imx-sdma.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 5cefc7d..3961c72 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1638,12 +1638,19 @@ static int sdma_remove(struct platform_device *pdev)
 	struct sdma_engine *sdma = platform_get_drvdata(pdev);
 	struct resource *iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	int irq = platform_get_irq(pdev, 0);
+	int i;
 
 	dma_async_device_unregister(&sdma->dma_device);
 	kfree(sdma->script_addrs);
 	free_irq(irq, sdma);
 	iounmap(sdma->regs);
 	release_mem_region(iores->start, resource_size(iores));
+	/* Kill the tasklet */
+	for (i = 0; i < MAX_DMA_CHANNELS; i++) {
+		struct sdma_channel *sdmac = &sdma->channel[i];
+
+		tasklet_kill(&sdmac->tasklet);
+	}
 	kfree(sdma);
 
 	platform_set_drvdata(pdev, NULL);
-- 
1.7.9.5


  parent reply	other threads:[~2014-08-05 13:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05 13:09 [PATCH v2 0/2] dma: imx-sdma: Modify SDMA's remove operation Vignesh Raman
2014-08-05 13:09 ` [PATCH v2 1/2] dma: imx-sdma: use module_platform_driver for SDMA driver Vignesh Raman
2014-08-05 13:09 ` Vignesh Raman [this message]
2014-08-19 15:22 ` [PATCH v2 0/2] dma: imx-sdma: Modify SDMA's remove operation Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1407244182-27302-3-git-send-email-Vignesh_Raman@mentor.com \
    --to=vignesh_raman@mentor.com \
    --cc=Jiada_Wang@mentor.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®