[PATCH v7 06/10] dmaengine: arm-dma350: Use managed device registration

Jelly Jia Jelly.Jia at cixtech.com
Tue Nov 17 01:43:31 PST 2026


Use managed DMA device registration so probe unwind and device removal
unregister the DMA device before its managed resources are released. Drop
the explicit remove callback.

Signed-off-by: Jelly Jia <Jelly.Jia at cixtech.com>
---
 drivers/dma/arm-dma350.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/dma/arm-dma350.c b/drivers/dma/arm-dma350.c
index f785251935f4..bf87460c1c20 100644
--- a/drivers/dma/arm-dma350.c
+++ b/drivers/dma/arm-dma350.c
@@ -690,20 +690,13 @@ static int d350_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, dmac);
 
-	ret = dma_async_device_register(&dmac->dma);
+	ret = dmaenginem_async_device_register(&dmac->dma);
 	if (ret)
 		return dev_err_probe(dev, ret, "Failed to register DMA device\n");
 
 	return 0;
 }
 
-static void d350_remove(struct platform_device *pdev)
-{
-	struct d350 *dmac = platform_get_drvdata(pdev);
-
-	dma_async_device_unregister(&dmac->dma);
-}
-
 static const struct of_device_id d350_of_match[] __maybe_unused = {
 	{ .compatible = "arm,dma-350" },
 	{}
@@ -716,7 +709,6 @@ static struct platform_driver d350_driver = {
 		.of_match_table = of_match_ptr(d350_of_match),
 	},
 	.probe = d350_probe,
-	.remove = d350_remove,
 };
 module_platform_driver(d350_driver);
 
-- 
2.54.0




More information about the linux-arm-kernel mailing list