All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Convert s6000 directory to module_platform_driver
@ 2011-11-24  4:14 Axel Lin
  2011-11-24 10:41 ` Daniel Glöckner
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2011-11-24  4:14 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Daniel Glöckner, Liam Girdwood

Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/s6000/s6000-i2s.c |   12 +-----------
 sound/soc/s6000/s6000-pcm.c |   12 +-----------
 2 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/sound/soc/s6000/s6000-i2s.c b/sound/soc/s6000/s6000-i2s.c
index 3052f64..4cc4181 100644
--- a/sound/soc/s6000/s6000-i2s.c
+++ b/sound/soc/s6000/s6000-i2s.c
@@ -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");
diff --git a/sound/soc/s6000/s6000-pcm.c b/sound/soc/s6000/s6000-pcm.c
index 55efc2b..43c014f 100644
--- a/sound/soc/s6000/s6000-pcm.c
+++ b/sound/soc/s6000/s6000-pcm.c
@@ -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");
-- 
1.7.5.4

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

* Re: [PATCH] ASoC: Convert s6000 directory to module_platform_driver
  2011-11-24  4:14 [PATCH] ASoC: Convert s6000 directory to module_platform_driver Axel Lin
@ 2011-11-24 10:41 ` Daniel Glöckner
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Glöckner @ 2011-11-24 10:41 UTC (permalink / raw)
  To: Axel Lin; +Cc: alsa-devel, Mark Brown, Daniel Glöckner, Liam Girdwood

On 11/24/2011 05:14 AM, Axel Lin wrote:
> Factor out some boilerplate code.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  sound/soc/s6000/s6000-i2s.c |   12 +-----------
>  sound/soc/s6000/s6000-pcm.c |   12 +-----------
>  2 files changed, 2 insertions(+), 22 deletions(-)

Acked-by: Daniel Glöckner <dg@emlix.com>


-- 
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

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

end of thread, other threads:[~2011-11-24 10:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-24  4:14 [PATCH] ASoC: Convert s6000 directory to module_platform_driver Axel Lin
2011-11-24 10:41 ` Daniel Glöckner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.