[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e7f489db-e04f-4e45-b331-51666b244a69@linaro.org>
Date: Fri, 21 Nov 2025 11:26:47 +0200
From: Eugen Hristev <eugen.hristev@...aro.org>
To: Amelie Delaunay <amelie.delaunay@...s.st.com>,
Vinod Koul <vkoul@...nel.org>, Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>
Cc: dmaengine@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] dmaengine: stm32-dma3: use module_platform_driver
On 11/3/25 12:15, Amelie Delaunay wrote:
> Without module_platform_driver(), stm32-dma3 doesn't have a
> module_exit procedure. Once stm32-dma3 module is inserted, it
> can't be removed, marked busy.
> Use module_platform_driver() instead of subsys_initcall() to register
> (insmod) and unregister (rmmod) stm32-dma3 driver.
>
> Signed-off-by: Amelie Delaunay <amelie.delaunay@...s.st.com>
Reviewed-by: Eugen Hristev <eugen.hristev@...aro.org>
> ---
> drivers/dma/stm32/stm32-dma3.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/dma/stm32/stm32-dma3.c b/drivers/dma/stm32/stm32-dma3.c
> index 50e7106c5cb7..9500164c8f68 100644
> --- a/drivers/dma/stm32/stm32-dma3.c
> +++ b/drivers/dma/stm32/stm32-dma3.c
> @@ -1914,12 +1914,7 @@ static struct platform_driver stm32_dma3_driver = {
> },
> };
>
> -static int __init stm32_dma3_init(void)
> -{
> - return platform_driver_register(&stm32_dma3_driver);
> -}
> -
> -subsys_initcall(stm32_dma3_init);
> +module_platform_driver(stm32_dma3_driver);
>
> MODULE_DESCRIPTION("STM32 DMA3 controller driver");
> MODULE_AUTHOR("Amelie Delaunay <amelie.delaunay@...s.st.com>");
>
Powered by blists - more mailing lists