Re: [PATCH v7 06/10] dmaengine: arm-dma350: Use managed device registration
From: Frank Li
Date: Fri Dec 04 2026 - 14:20:58 EST
On Tue, Nov 17, 2026 at 05:43:31PM +0800, Jelly Jia wrote:
> 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@xxxxxxxxxxx>
> ---
Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
move this patch to beginning, in case vinod can pick part of this serise.
Frank
> 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
>