From: Axel Lin <axel.lin@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Marek Vasut <marek.vasut@gmail.com>,
Philipp Zabel <philipp.zabel@gmail.com>,
Liam@alsa-project.org, Robert Jarzmik <robert.jarzmik@free.fr>,
Girdwood <lrg@ti.com>
Subject: [PATCH 6/8] ASoC: Convert pxa directory to module_platform_driver
Date: Fri, 25 Nov 2011 10:13:37 +0800 [thread overview]
Message-ID: <1322187217.8878.10.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/pxa/hx4700.c | 13 +------------
sound/soc/pxa/mioa701_wm9713.c | 13 +------------
sound/soc/pxa/palm27x.c | 13 +------------
sound/soc/pxa/pxa-ssp.c | 12 +-----------
sound/soc/pxa/pxa2xx-ac97.c | 12 +-----------
sound/soc/pxa/pxa2xx-pcm.c | 12 +-----------
6 files changed, 6 insertions(+), 69 deletions(-)
diff --git a/sound/soc/pxa/hx4700.c b/sound/soc/pxa/hx4700.c
index 65c1248..e32afaf 100644
--- a/sound/soc/pxa/hx4700.c
+++ b/sound/soc/pxa/hx4700.c
@@ -236,18 +236,7 @@ static struct platform_driver hx4700_audio_driver = {
.remove = __devexit_p(hx4700_audio_remove),
};
-static int __init hx4700_modinit(void)
-{
- return platform_driver_register(&hx4700_audio_driver);
-}
-module_init(hx4700_modinit);
-
-static void __exit hx4700_modexit(void)
-{
- platform_driver_unregister(&hx4700_audio_driver);
-}
-
-module_exit(hx4700_modexit);
+module_platform_driver(hx4700_audio_driver);
MODULE_AUTHOR("Philipp Zabel");
MODULE_DESCRIPTION("ALSA SoC iPAQ hx4700");
diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c
index 0b8d1ee..0e73a7f 100644
--- a/sound/soc/pxa/mioa701_wm9713.c
+++ b/sound/soc/pxa/mioa701_wm9713.c
@@ -227,18 +227,7 @@ static struct platform_driver mioa701_wm9713_driver = {
},
};
-static int __init mioa701_asoc_init(void)
-{
- return platform_driver_register(&mioa701_wm9713_driver);
-}
-
-static void __exit mioa701_asoc_exit(void)
-{
- platform_driver_unregister(&mioa701_wm9713_driver);
-}
-
-module_init(mioa701_asoc_init);
-module_exit(mioa701_asoc_exit);
+module_platform_driver(mioa701_wm9713_driver);
/* Module information */
MODULE_AUTHOR("Robert Jarzmik (rjarzmik@free.fr)");
diff --git a/sound/soc/pxa/palm27x.c b/sound/soc/pxa/palm27x.c
index 7edc1fb..f313eca 100644
--- a/sound/soc/pxa/palm27x.c
+++ b/sound/soc/pxa/palm27x.c
@@ -201,18 +201,7 @@ static struct platform_driver palm27x_wm9712_driver = {
},
};
-static int __init palm27x_asoc_init(void)
-{
- return platform_driver_register(&palm27x_wm9712_driver);
-}
-
-static void __exit palm27x_asoc_exit(void)
-{
- platform_driver_unregister(&palm27x_wm9712_driver);
-}
-
-module_init(palm27x_asoc_init);
-module_exit(palm27x_asoc_exit);
+module_platform_driver(palm27x_wm9712_driver);
/* Module information */
MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index 9c9a51e..a57cfbc 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -825,17 +825,7 @@ static struct platform_driver asoc_ssp_driver = {
.remove = __devexit_p(asoc_ssp_remove),
};
-static int __init pxa_ssp_init(void)
-{
- return platform_driver_register(&asoc_ssp_driver);
-}
-module_init(pxa_ssp_init);
-
-static void __exit pxa_ssp_exit(void)
-{
- platform_driver_unregister(&asoc_ssp_driver);
-}
-module_exit(pxa_ssp_exit);
+module_platform_driver(asoc_ssp_driver);
/* Module information */
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c
index 3fec2f3..837ff34 100644
--- a/sound/soc/pxa/pxa2xx-ac97.c
+++ b/sound/soc/pxa/pxa2xx-ac97.c
@@ -263,17 +263,7 @@ static struct platform_driver pxa2xx_ac97_driver = {
},
};
-static int __init pxa_ac97_init(void)
-{
- return platform_driver_register(&pxa2xx_ac97_driver);
-}
-module_init(pxa_ac97_init);
-
-static void __exit pxa_ac97_exit(void)
-{
- platform_driver_unregister(&pxa2xx_ac97_driver);
-}
-module_exit(pxa_ac97_exit);
+module_platform_driver(pxa2xx_ac97_driver);
MODULE_AUTHOR("Nicolas Pitre");
MODULE_DESCRIPTION("AC97 driver for the Intel PXA2xx chip");
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c
index 600676f..fdd6bed 100644
--- a/sound/soc/pxa/pxa2xx-pcm.c
+++ b/sound/soc/pxa/pxa2xx-pcm.c
@@ -141,17 +141,7 @@ static struct platform_driver pxa_pcm_driver = {
.remove = __devexit_p(pxa2xx_soc_platform_remove),
};
-static int __init snd_pxa_pcm_init(void)
-{
- return platform_driver_register(&pxa_pcm_driver);
-}
-module_init(snd_pxa_pcm_init);
-
-static void __exit snd_pxa_pcm_exit(void)
-{
- platform_driver_unregister(&pxa_pcm_driver);
-}
-module_exit(snd_pxa_pcm_exit);
+module_platform_driver(pxa_pcm_driver);
MODULE_AUTHOR("Nicolas Pitre");
MODULE_DESCRIPTION("Intel PXA2xx PCM DMA module");
--
1.7.5.4
next prev parent reply other threads:[~2011-11-25 2:13 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 ` [PATCH 5/8] ASoC: Convert omap " Axel Lin
2011-11-25 8:18 ` Jarkko Nikula
2011-11-25 13:03 ` Péter Ujfalusi
2011-11-25 2:13 ` Axel Lin [this message]
2011-11-25 8:10 ` [PATCH 6/8] ASoC: Convert pxa " 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=1322187217.8878.10.camel@phoenix \
--to=axel.lin@gmail.com \
--cc=Liam@alsa-project.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@ti.com \
--cc=marek.vasut@gmail.com \
--cc=philipp.zabel@gmail.com \
--cc=robert.jarzmik@free.fr \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox