diff mbox

[29/32] dmaengine: qcom_hidma: kill the tasklets upon exit

Message ID 1467730478-9696-30-git-send-email-vinod.koul@intel.com (mailing list archive)
State Accepted
Headers show

Commit Message

Vinod Koul July 5, 2016, 2:54 p.m. UTC
drivers should ensure that tasklets are killed, so that they can't be
run after driver remove is executed

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Cc: Sinan Kaya <okaya@codeaurora.org>
---
 drivers/dma/qcom/hidma.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Sinan Kaya July 6, 2016, 6:47 a.m. UTC | #1
On 2016-07-05 17:54, Vinod Koul wrote:
> drivers should ensure that tasklets are killed, so that they can't be
> run after driver remove is executed
> 
> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> Cc: Sinan Kaya <okaya@codeaurora.org>
> ---
>  drivers/dma/qcom/hidma.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
> index 41b5c6dee713..b2374cd91e45 100644
> --- a/drivers/dma/qcom/hidma.c
> +++ b/drivers/dma/qcom/hidma.c
> @@ -708,6 +708,7 @@ static int hidma_remove(struct platform_device 
> *pdev)
>  	pm_runtime_get_sync(dmadev->ddev.dev);
>  	dma_async_device_unregister(&dmadev->ddev);
>  	devm_free_irq(dmadev->ddev.dev, dmadev->irq, dmadev->lldev);
> +	tasklet_kill(&dmadev->task);
>  	hidma_debug_uninit(dmadev);
>  	hidma_ll_uninit(dmadev->lldev);
>  	hidma_free(dmadev);

Acked-by: Sinan Kaya <okaya@codeaurora.org>

Thanks for taking care of this. We also need one more tasklet_kill for 
rst_task in hidma_ll.c

--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
index 41b5c6dee713..b2374cd91e45 100644
--- a/drivers/dma/qcom/hidma.c
+++ b/drivers/dma/qcom/hidma.c
@@ -708,6 +708,7 @@  static int hidma_remove(struct platform_device *pdev)
 	pm_runtime_get_sync(dmadev->ddev.dev);
 	dma_async_device_unregister(&dmadev->ddev);
 	devm_free_irq(dmadev->ddev.dev, dmadev->irq, dmadev->lldev);
+	tasklet_kill(&dmadev->task);
 	hidma_debug_uninit(dmadev);
 	hidma_ll_uninit(dmadev->lldev);
 	hidma_free(dmadev);