Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dmaengine: stm32-dma3: use module_platform_driver

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.

Reviewed-by: Eugen Hristev <eugen.hristev@linaro.org>
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://patch.msgid.link/20251121-dma3_improv-v2-1-76a207b13ea6@foss.st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Amelie Delaunay and committed by
Vinod Koul
0d41ed4e bbfb8677

+1 -6
+1 -6
drivers/dma/stm32/stm32-dma3.c
··· 1914 1914 }, 1915 1915 }; 1916 1916 1917 - static int __init stm32_dma3_init(void) 1918 - { 1919 - return platform_driver_register(&stm32_dma3_driver); 1920 - } 1921 - 1922 - subsys_initcall(stm32_dma3_init); 1917 + module_platform_driver(stm32_dma3_driver); 1923 1918 1924 1919 MODULE_DESCRIPTION("STM32 DMA3 controller driver"); 1925 1920 MODULE_AUTHOR("Amelie Delaunay <amelie.delaunay@foss.st.com>");