On Fri, Nov 06, 2026 at 07:06:09PM -0500, Brian Masney wrote:
> Reduce boilerplate code in these drivers and convert them over to use
> the macro subsys_platform_driver_probe().
>
> Signed-off-by: Brian Masney <[email protected]>
> ---

Reviewed-by: Frank Li <[email protected]>

>  drivers/dma/imx-dma.c   | 6 +-----
>  drivers/dma/ste_dma40.c | 6 +-----
>  2 files changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
> index 81c6276436f8..8e0e82df8c5b 100644
> --- a/drivers/dma/imx-dma.c
> +++ b/drivers/dma/imx-dma.c
> @@ -1238,11 +1238,7 @@ static struct platform_driver imxdma_driver = {
>       .remove         = imxdma_remove,
>  };
>
> -static int __init imxdma_module_init(void)
> -{
> -     return platform_driver_probe(&imxdma_driver, imxdma_probe);
> -}
> -subsys_initcall(imxdma_module_init);
> +subsys_platform_driver_probe(imxdma_driver, imxdma_probe);
>
>  MODULE_AUTHOR("Sascha Hauer, Pengutronix <[email protected]>");
>  MODULE_DESCRIPTION("i.MX dma driver");
> diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
> index 2e83503f71d1..4fb54c8f2d23 100644
> --- a/drivers/dma/ste_dma40.c
> +++ b/drivers/dma/ste_dma40.c
> @@ -3990,8 +3990,4 @@ static struct platform_driver d40_driver = {
>       },
>  };
>
> -static int __init stedma40_init(void)
> -{
> -     return platform_driver_probe(&d40_driver, d40_probe);
> -}
> -subsys_initcall(stedma40_init);
> +subsys_platform_driver_probe(d40_driver, d40_probe);
>
> --
> 2.56.0
>

Reply via email to