Skip to contentSkip to conversation

ASoC: ti: davinci-evm: simplify the code with module_platform_driver

PATCH In review Yang Yingliang 2 participants 2 messages Aug 4, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: ti: davinci-evm: simplify the code with module_platform_driver

The init/exit() of driver only calls platform_driver_register/unregister, it can be simpilfied with module_platform_driver.

---
 sound/soc/ti/davinci-evm.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
sound/soc/ti/davinci-evm.c +1 -12
index 983d69b951b0..544cb3da50eb 100644
@@ -257,18 +257,7 @@ static struct platform_driver davinci_evm_driver = {
 	},
 };
 
-static int __init evm_init(void)
-{
-	return platform_driver_register(&davinci_evm_driver);
-}
-
-static void __exit evm_exit(void)
-{
-	platform_driver_unregister(&davinci_evm_driver);
-}
-
-module_init(evm_init);
-module_exit(evm_exit);
+module_platform_driver(davinci_evm_driver);
 
 MODULE_AUTHOR("Vladimir Barinov");
 MODULE_DESCRIPTION("TI DAVINCI EVM ASoC driver");
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 4 lines · Yang Yingliang

The init/exit() of driver only calls platform_driver_register/unregister, it can be simpilfied with module_platform_driver.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: ti: davinci-evm: simplify the code with module_platform_driver

      commit: 9606cda3501ae5d1a865d839ee5dbae9552a7b37

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark