mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eugen Hristev <eugen.hristev@linaro.org>
To: Amelie Delaunay <amelie.delaunay@foss.st.com>,
	Vinod Koul <vkoul@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: dmaengine@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] dmaengine: stm32-dma3: use module_platform_driver
Date: Fri, 21 Nov 2025 11:26:47 +0200	[thread overview]
Message-ID: <e7f489db-e04f-4e45-b331-51666b244a69@linaro.org> (raw)
In-Reply-To: <20251103-dma3_improv-v1-1-57f048bf2877@foss.st.com>



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@foss.st.com>

Reviewed-by: Eugen Hristev <eugen.hristev@linaro.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@foss.st.com>");
> 


  reply	other threads:[~2025-11-21  9:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-03 10:15 [PATCH 0/4] dmaengine: stm32-dma3: improvements and helper functions Amelie Delaunay
2025-11-03 10:15 ` [PATCH 1/4] dmaengine: stm32-dma3: use module_platform_driver Amelie Delaunay
2025-11-21  9:26   ` Eugen Hristev [this message]
2025-11-03 10:15 ` [PATCH 2/4] dmaengine: stm32-dma3: introduce channel semaphore helpers Amelie Delaunay
2025-11-03 10:15 ` [PATCH 3/4] dmaengine: stm32-dma3: restore channel semaphore status after suspend Amelie Delaunay
2025-11-03 10:15 ` [PATCH 4/4] dmaengine: stm32-dma3: introduce ddata2dev helper Amelie Delaunay
2025-11-21  9:25   ` Eugen Hristev
2025-11-21 12:16     ` Amelie Delaunay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e7f489db-e04f-4e45-b331-51666b244a69@linaro.org \
    --to=eugen.hristev@linaro.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=amelie.delaunay@foss.st.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®