[PATCH 3/3] dmaengine: fsldma: convert to subsys_platform_driver()
Brian Masney
bmasney at redhat.com
Fri Nov 6 16:06:10 PST 2026
Reduce boilerplate code in this driver and convert it over to use
the macro subsys_platform_driver().
Note that this driver previously displayed a log message during init
time, and this change drops that message.
Signed-off-by: Brian Masney <bmasney at redhat.com>
---
drivers/dma/fsldma.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 99a878ed1444..fd3dca7616a8 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -1431,19 +1431,7 @@ static struct platform_driver fsldma_of_driver = {
/* Module Init / Exit */
/*----------------------------------------------------------------------------*/
-static __init int fsldma_init(void)
-{
- pr_info("Freescale Elo series DMA driver\n");
- return platform_driver_register(&fsldma_of_driver);
-}
-
-static void __exit fsldma_exit(void)
-{
- platform_driver_unregister(&fsldma_of_driver);
-}
-
-subsys_initcall(fsldma_init);
-module_exit(fsldma_exit);
+subsys_platform_driver(fsldma_of_driver);
MODULE_DESCRIPTION("Freescale Elo series DMA driver");
MODULE_LICENSE("GPL");
--
2.56.0
More information about the linux-riscv
mailing list