All of lore.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Jorge Candelaria <jorge.candelaria@ti.com>,
	Ricardo Neri <ricardo.neri@ti.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Lopez Cruz <misael.lopez@ti.com>,
	Misael@alsa-project.org, Liam Girdwood <lrg@ti.com>,
	Jarkko Nikula <jarkko.nikula@bitmer.com>
Subject: [PATCH 5/8] ASoC: Convert omap directory to module_platform_driver
Date: Fri, 25 Nov 2011 10:12:16 +0800	[thread overview]
Message-ID: <1322187136.8878.8.camel@phoenix> (raw)
In-Reply-To: <1322186745.8878.1.camel@phoenix>

Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/omap/omap-hdmi.c       |   12 +-----------
 sound/soc/omap/omap-mcbsp.c      |   12 +-----------
 sound/soc/omap/omap-mcpdm.c      |   12 +-----------
 sound/soc/omap/omap-pcm.c        |   12 +-----------
 sound/soc/omap/omap4-hdmi-card.c |   12 +-----------
 5 files changed, 5 insertions(+), 55 deletions(-)

diff --git a/sound/soc/omap/omap-hdmi.c b/sound/soc/omap/omap-hdmi.c
index 9bb1cf8..38e0def 100644
--- a/sound/soc/omap/omap-hdmi.c
+++ b/sound/soc/omap/omap-hdmi.c
@@ -139,17 +139,7 @@ static struct platform_driver hdmi_dai_driver = {
 	.remove = __devexit_p(omap_hdmi_remove),
 };
 
-static int __init hdmi_dai_init(void)
-{
-	return platform_driver_register(&hdmi_dai_driver);
-}
-module_init(hdmi_dai_init);
-
-static void __exit hdmi_dai_exit(void)
-{
-	platform_driver_unregister(&hdmi_dai_driver);
-}
-module_exit(hdmi_dai_exit);
+module_platform_driver(hdmi_dai_driver);
 
 MODULE_AUTHOR("Jorge Candelaria <jorge.candelaria@ti.com>");
 MODULE_AUTHOR("Ricardo Neri <ricardo.neri@ti.com>");
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index d91e6ef..bd11d25 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -785,17 +785,7 @@ static struct platform_driver asoc_mcbsp_driver = {
 	.remove = __devexit_p(asoc_mcbsp_remove),
 };
 
-static int __init snd_omap_mcbsp_init(void)
-{
-	return platform_driver_register(&asoc_mcbsp_driver);
-}
-module_init(snd_omap_mcbsp_init);
-
-static void __exit snd_omap_mcbsp_exit(void)
-{
-	platform_driver_unregister(&asoc_mcbsp_driver);
-}
-module_exit(snd_omap_mcbsp_exit);
+module_platform_driver(asoc_mcbsp_driver);
 
 MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@bitmer.com>");
 MODULE_DESCRIPTION("OMAP I2S SoC Interface");
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
index cc8ceff..b50ac60 100644
--- a/sound/soc/omap/omap-mcpdm.c
+++ b/sound/soc/omap/omap-mcpdm.c
@@ -520,17 +520,7 @@ static struct platform_driver asoc_mcpdm_driver = {
 	.remove	= __devexit_p(asoc_mcpdm_remove),
 };
 
-static int __init snd_omap_mcpdm_init(void)
-{
-	return platform_driver_register(&asoc_mcpdm_driver);
-}
-module_init(snd_omap_mcpdm_init);
-
-static void __exit snd_omap_mcpdm_exit(void)
-{
-	platform_driver_unregister(&asoc_mcpdm_driver);
-}
-module_exit(snd_omap_mcpdm_exit);
+module_platform_driver(asoc_mcpdm_driver);
 
 MODULE_AUTHOR("Misael Lopez Cruz <misael.lopez@ti.com>");
 MODULE_DESCRIPTION("OMAP PDM SoC Interface");
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 6ede7dc..52a0f63 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -433,17 +433,7 @@ static struct platform_driver omap_pcm_driver = {
 	.remove = __devexit_p(omap_pcm_remove),
 };
 
-static int __init snd_omap_pcm_init(void)
-{
-	return platform_driver_register(&omap_pcm_driver);
-}
-module_init(snd_omap_pcm_init);
-
-static void __exit snd_omap_pcm_exit(void)
-{
-	platform_driver_unregister(&omap_pcm_driver);
-}
-module_exit(snd_omap_pcm_exit);
+module_platform_driver(omap_pcm_driver);
 
 MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@bitmer.com>");
 MODULE_DESCRIPTION("OMAP PCM DMA module");
diff --git a/sound/soc/omap/omap4-hdmi-card.c b/sound/soc/omap/omap4-hdmi-card.c
index 8671261..52d471c 100644
--- a/sound/soc/omap/omap4-hdmi-card.c
+++ b/sound/soc/omap/omap4-hdmi-card.c
@@ -112,17 +112,7 @@ static struct platform_driver omap4_hdmi_driver = {
 	.remove = __devexit_p(omap4_hdmi_remove),
 };
 
-static int __init omap4_hdmi_init(void)
-{
-	return platform_driver_register(&omap4_hdmi_driver);
-}
-module_init(omap4_hdmi_init);
-
-static void __exit omap4_hdmi_exit(void)
-{
-	platform_driver_unregister(&omap4_hdmi_driver);
-}
-module_exit(omap4_hdmi_exit);
+module_platform_driver(omap4_hdmi_driver);
 
 MODULE_AUTHOR("Ricardo Neri <ricardo.neri@ti.com>");
 MODULE_DESCRIPTION("OMAP4 HDMI machine ASoC driver");
-- 
1.7.5.4

  parent reply	other threads:[~2011-11-25  2:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-25  2:05 [PATCH 1/8] ASoC: Convert atmel directory to module_platform_driver Axel Lin
2011-11-25  2:06 ` [PATCH 2/8] ASoC: Convert au1x " Axel Lin
2011-11-29  6:28   ` Manuel Lauss
2011-11-25  2:09 ` [PATCH 3/8] ASoC: Convert davinci " Axel Lin
2011-11-25  2:10 ` [PATCH 4/8] ASoC: Convert fsl " Axel Lin
2011-11-28 17:15   ` Timur Tabi
2011-11-28 17:23   ` Mark Brown
2011-11-25  2:12 ` Axel Lin [this message]
2011-11-25  8:18   ` [PATCH 5/8] ASoC: Convert omap " Jarkko Nikula
2011-11-25 13:03   ` Péter Ujfalusi
2011-11-25  2:13 ` [PATCH 6/8] ASoC: Convert pxa " Axel Lin
2011-11-25  8:10   ` Marek Vasut
2011-11-25  8:44     ` robert.jarzmik
2011-11-25  2:15 ` [PATCH 7/8] ASoC: Convert sh " Axel Lin
2011-11-25  2:16 ` [PATCH 8/8] ASoC: Convert txx9 " Axel Lin
2011-11-25  8:22 ` [PATCH 1/8] ASoC: Convert atmel " Nicolas Ferre
2011-11-25 13:16 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1322187136.8878.8.camel@phoenix \
    --to=axel.lin@gmail.com \
    --cc=Misael@alsa-project.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=jarkko.nikula@bitmer.com \
    --cc=jorge.candelaria@ti.com \
    --cc=lrg@ti.com \
    --cc=misael.lopez@ti.com \
    --cc=ricardo.neri@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.