Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] ASoC: ti: davinci-evm: simplify the code with module_platform_driver
@ 2023-01-12 13:54 Yang Yingliang
  2023-01-13 21:25 ` Péter Ujfalusi
  2023-01-19 14:29 ` Mark Brown
  0 siblings, 2 replies; 6+ messages in thread
From: Yang Yingliang @ 2023-01-12 13:54 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, lgirdwood, broonie, yangyingliang, peter.ujfalusi

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

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 sound/soc/ti/davinci-evm.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/sound/soc/ti/davinci-evm.c b/sound/soc/ti/davinci-evm.c
index 983d69b951b0..544cb3da50eb 100644
--- a/sound/soc/ti/davinci-evm.c
+++ b/sound/soc/ti/davinci-evm.c
@@ -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");
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH -next] ASoC: ti: davinci-evm: simplify the code with module_platform_driver
@ 2023-08-04  8:54 Yang Yingliang
  2023-08-04 16:57 ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Yang Yingliang @ 2023-08-04  8:54 UTC (permalink / raw)
  To: alsa-devel; +Cc: lgirdwood, broonie, perex, tiwai, yangyingliang

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

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 sound/soc/ti/davinci-evm.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/sound/soc/ti/davinci-evm.c b/sound/soc/ti/davinci-evm.c
index 983d69b951b0..544cb3da50eb 100644
--- a/sound/soc/ti/davinci-evm.c
+++ b/sound/soc/ti/davinci-evm.c
@@ -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");
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-08-04 16:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-12 13:54 [PATCH -next] ASoC: ti: davinci-evm: simplify the code with module_platform_driver Yang Yingliang
2023-01-13 21:25 ` Péter Ujfalusi
2023-01-19 14:29 ` Mark Brown
2023-01-30  2:22   ` Yang Yingliang
  -- strict thread matches above, loose matches on Subject: below --
2023-08-04  8:54 Yang Yingliang
2023-08-04 16:57 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox