From: Axel Lin <axel.lin@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Carlos Munoz <carlos@kenati.com>,
Manuel Lauss <mano@roarinelk.homelinux.net>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Kuninori Morimoto <morimoto.kuninori@renesas.com>,
Liam@alsa-project.org, Girdwood <lrg@ti.com>
Subject: [PATCH 7/8] ASoC: Convert sh directory to module_platform_driver
Date: Fri, 25 Nov 2011 10:15:07 +0800 [thread overview]
Message-ID: <1322187307.8878.12.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/sh/dma-sh7760.c | 12 +-----------
sound/soc/sh/fsi-ak4642.c | 13 +------------
sound/soc/sh/fsi-hdmi.c | 13 +------------
sound/soc/sh/fsi.c | 13 +------------
sound/soc/sh/hac.c | 12 +-----------
sound/soc/sh/siu_dai.c | 13 +------------
sound/soc/sh/ssi.c | 12 +-----------
7 files changed, 7 insertions(+), 81 deletions(-)
diff --git a/sound/soc/sh/dma-sh7760.c b/sound/soc/sh/dma-sh7760.c
index db74005..7da2018 100644
--- a/sound/soc/sh/dma-sh7760.c
+++ b/sound/soc/sh/dma-sh7760.c
@@ -369,17 +369,7 @@ static struct platform_driver sh7760_pcm_driver = {
.remove = __devexit_p(sh7760_soc_platform_remove),
};
-static int __init snd_sh7760_pcm_init(void)
-{
- return platform_driver_register(&sh7760_pcm_driver);
-}
-module_init(snd_sh7760_pcm_init);
-
-static void __exit snd_sh7760_pcm_exit(void)
-{
- platform_driver_unregister(&sh7760_pcm_driver);
-}
-module_exit(snd_sh7760_pcm_exit);
+module_platform_driver(sh7760_pcm_driver);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("SH7760 Audio DMA (DMABRG) driver");
diff --git a/sound/soc/sh/fsi-ak4642.c b/sound/soc/sh/fsi-ak4642.c
index dff64b9..d81de3d 100644
--- a/sound/soc/sh/fsi-ak4642.c
+++ b/sound/soc/sh/fsi-ak4642.c
@@ -192,18 +192,7 @@ static struct platform_driver fsi_ak4642 = {
.id_table = fsi_id_table,
};
-static int __init fsi_ak4642_init(void)
-{
- return platform_driver_register(&fsi_ak4642);
-}
-
-static void __exit fsi_ak4642_exit(void)
-{
- platform_driver_unregister(&fsi_ak4642);
-}
-
-module_init(fsi_ak4642_init);
-module_exit(fsi_ak4642_exit);
+module_platform_driver(fsi_ak4642);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Generic SH4 FSI-AK4642 sound card");
diff --git a/sound/soc/sh/fsi-hdmi.c b/sound/soc/sh/fsi-hdmi.c
index 3ebebe7..621aea1 100644
--- a/sound/soc/sh/fsi-hdmi.c
+++ b/sound/soc/sh/fsi-hdmi.c
@@ -110,18 +110,7 @@ static struct platform_driver fsi_hdmi = {
.id_table = fsi_id_table,
};
-static int __init fsi_hdmi_init(void)
-{
- return platform_driver_register(&fsi_hdmi);
-}
-
-static void __exit fsi_hdmi_exit(void)
-{
- platform_driver_unregister(&fsi_hdmi);
-}
-
-module_init(fsi_hdmi_init);
-module_exit(fsi_hdmi_exit);
+module_platform_driver(fsi_hdmi);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Generic SH4 FSI-HDMI sound card");
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index aa30330..a27c306 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -1468,18 +1468,7 @@ static struct platform_driver fsi_driver = {
.id_table = fsi_id_table,
};
-static int __init fsi_mobile_init(void)
-{
- return platform_driver_register(&fsi_driver);
-}
-
-static void __exit fsi_mobile_exit(void)
-{
- platform_driver_unregister(&fsi_driver);
-}
-
-module_init(fsi_mobile_init);
-module_exit(fsi_mobile_exit);
+module_platform_driver(fsi_driver);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("SuperH onchip FSI audio driver");
diff --git a/sound/soc/sh/hac.c b/sound/soc/sh/hac.c
index a1f307b..3474d7b 100644
--- a/sound/soc/sh/hac.c
+++ b/sound/soc/sh/hac.c
@@ -332,17 +332,7 @@ static struct platform_driver hac_pcm_driver = {
.remove = __devexit_p(hac_soc_platform_remove),
};
-static int __init sh4_hac_pcm_init(void)
-{
- return platform_driver_register(&hac_pcm_driver);
-}
-module_init(sh4_hac_pcm_init);
-
-static void __exit sh4_hac_pcm_exit(void)
-{
- platform_driver_unregister(&hac_pcm_driver);
-}
-module_exit(sh4_hac_pcm_exit);
+module_platform_driver(hac_pcm_driver);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("SuperH onchip HAC (AC97) audio driver");
diff --git a/sound/soc/sh/siu_dai.c b/sound/soc/sh/siu_dai.c
index 93dea49..11c6085 100644
--- a/sound/soc/sh/siu_dai.c
+++ b/sound/soc/sh/siu_dai.c
@@ -852,18 +852,7 @@ static struct platform_driver siu_driver = {
.remove = __devexit_p(siu_remove),
};
-static int __init siu_init(void)
-{
- return platform_driver_register(&siu_driver);
-}
-
-static void __exit siu_exit(void)
-{
- platform_driver_unregister(&siu_driver);
-}
-
-module_init(siu_init)
-module_exit(siu_exit)
+module_platform_driver(siu_driver);
MODULE_AUTHOR("Carlos Munoz <carlos@kenati.com>");
MODULE_DESCRIPTION("ALSA SoC SH7722 SIU driver");
diff --git a/sound/soc/sh/ssi.c b/sound/soc/sh/ssi.c
index 1fda16a..ff82b56 100644
--- a/sound/soc/sh/ssi.c
+++ b/sound/soc/sh/ssi.c
@@ -401,17 +401,7 @@ static struct platform_driver sh4_ssi_driver = {
.remove = __devexit_p(sh4_soc_dai_remove),
};
-static int __init snd_sh4_ssi_init(void)
-{
- return platform_driver_register(&sh4_ssi_driver);
-}
-module_init(snd_sh4_ssi_init);
-
-static void __exit snd_sh4_ssi_exit(void)
-{
- platform_driver_unregister(&sh4_ssi_driver);
-}
-module_exit(snd_sh4_ssi_exit);
+module_platform_driver(sh4_ssi_driver);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("SuperH onchip SSI (I2S) audio driver");
--
1.7.5.4
next prev parent reply other threads:[~2011-11-25 2:15 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 ` [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 ` Axel Lin [this message]
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=1322187307.8878.12.camel@phoenix \
--to=axel.lin@gmail.com \
--cc=Liam@alsa-project.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=carlos@kenati.com \
--cc=lrg@ti.com \
--cc=mano@roarinelk.homelinux.net \
--cc=morimoto.kuninori@renesas.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox