[PATCH] dmaengine: Convert to subsys_platform_driver()

Andy Shevchenko andriy.shevchenko at linux.intel.com
Wed Nov 4 04:00:33 PST 2026


On Wed, Nov 04, 2026 at 07:33:02PM +0800, Peng Fan (OSS) wrote:

> Replace the open-coded subsys_initcall()/module_exit() platform driver
> registration with subsys_platform_driver().
> 
> No functional change.

Ah, good one!

>  drivers/dma/dw/platform.c       | 13 +------------

> --- a/drivers/dma/dw/platform.c
> +++ b/drivers/dma/dw/platform.c
> @@ -194,18 +194,7 @@ static struct platform_driver dw_driver = {
>  		.acpi_match_table = ACPI_PTR(dw_dma_acpi_id_table),
>  	},
>  };
> -
> -static int __init dw_init(void)
> -{
> -	return platform_driver_register(&dw_driver);
> -}
> -subsys_initcall(dw_init);
> -
> -static void __exit dw_exit(void)
> -{
> -	platform_driver_unregister(&dw_driver);
> -}
> -module_exit(dw_exit);
> +subsys_platform_driver(dw_driver);
>  
>  MODULE_LICENSE("GPL v2");
>  MODULE_DESCRIPTION("Synopsys DesignWare DMA Controller platform driver");

Reviewed-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com> # dw

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-riscv mailing list