[PATCH v2 04/10] dmaengine: imx-sdma: sdma_remove minor cleanups

Marco Felsch posted 10 patches 2 weeks, 6 days ago
[PATCH v2 04/10] dmaengine: imx-sdma: sdma_remove minor cleanups
Posted by Marco Felsch 2 weeks, 6 days ago
We don't need to set the pdev driver data to NULL since the device will
be freed anyways.

Also drop the tasklet_kill() since this is done by the virt-dma driver
during the vchan_synchronize().

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 drivers/dma/imx-sdma.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index dab3589e1c8d9efe06e16925c53554f8e22ce679..44411c15029c9b09f307c4b9e3f7b1ab77fa5093 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -2446,11 +2446,8 @@ static void sdma_remove(struct platform_device *pdev)
 	for (i = 0; i < MAX_DMA_CHANNELS; i++) {
 		struct sdma_channel *sdmac = &sdma->channel[i];
 
-		tasklet_kill(&sdmac->vc.task);
 		sdma_free_chan_resources(&sdmac->vc.chan);
 	}
-
-	platform_set_drvdata(pdev, NULL);
 }
 
 static struct platform_driver sdma_driver = {

-- 
2.47.3
Re: [PATCH v2 04/10] dmaengine: imx-sdma: sdma_remove minor cleanups
Posted by Peng Fan 2 weeks, 6 days ago
On Thu, Sep 11, 2025 at 11:56:45PM +0200, Marco Felsch wrote:
>We don't need to set the pdev driver data to NULL since the device will
>be freed anyways.
>
>Also drop the tasklet_kill() since this is done by the virt-dma driver
>during the vchan_synchronize().
>
>Reviewed-by: Frank Li <Frank.Li@nxp.com>
>Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>

Reviewed-by: Peng Fan <peng.fan@nxp.com>