Skip to contentSkip to conversation

ASoC: Convert s6000 directory to module_platform_driver

PATCH In review Axel Lin 2 participants 2 messages Nov 24, 2011

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ASoC: Convert s6000 directory to module_platform_driver

Factor out some boilerplate code.

---
 sound/soc/s6000/s6000-i2s.c |   12 +-----------
 sound/soc/s6000/s6000-pcm.c |   12 +-----------
 2 files changed, 2 insertions(+), 22 deletions(-)
sound/soc/s6000/s6000-i2s.c +1 -11
index 3052f64..4cc4181 100644
@@ -604,17 +604,7 @@ static struct platform_driver s6000_i2s_driver = {
 	},
 };
 
-static int __init s6000_i2s_init(void)
-{
-	return platform_driver_register(&s6000_i2s_driver);
-}
-module_init(s6000_i2s_init);
-
-static void __exit s6000_i2s_exit(void)
-{
-	platform_driver_unregister(&s6000_i2s_driver);
-}
-module_exit(s6000_i2s_exit);
+module_platform_driver(s6000_i2s_driver);
 
 MODULE_AUTHOR("Daniel Gloeckner");
 MODULE_DESCRIPTION("Stretch s6000 family I2S SoC Interface");
sound/soc/s6000/s6000-pcm.c +1 -11
index 55efc2b..43c014f 100644
@@ -520,17 +520,7 @@ static struct platform_driver s6000_pcm_driver = {
 	.remove = __devexit_p(s6000_soc_platform_remove),
 };
 
-static int __init snd_s6000_pcm_init(void)
-{
-	return platform_driver_register(&s6000_pcm_driver);
-}
-module_init(snd_s6000_pcm_init);
-
-static void __exit snd_s6000_pcm_exit(void)
-{
-	platform_driver_unregister(&s6000_pcm_driver);
-}
-module_exit(snd_s6000_pcm_exit);
+module_platform_driver(s6000_pcm_driver);
 
 MODULE_AUTHOR("Daniel Gloeckner");
 MODULE_DESCRIPTION("Stretch s6000 family PCM DMA module");
Signature · 1 line
1.7.5.4
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Axel Lin

Factor out some boilerplate code.

---
 sound/soc/s6000/s6000-i2s.c |   12 +-----------
 sound/soc/s6000/s6000-pcm.c |   12 +-----------
 2 files changed, 2 insertions(+), 22 deletions(-)
Signature · 7 lines
Dipl.-Math. Daniel Glöckner, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11,
Bertha-von-Suttner-Straße 9, 37085 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführer: Dr. Uwe Kracke, Ust-IdNr.: DE 205 198 055

emlix - your embedded linux partner