aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-11-24 21:12:16 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-25 08:15:31 -0500
commitbeda5bf575a93823289fbeb868b42e75e9f08d96 (patch)
treeb33732aec1d0724f77fb48f96eb34766356d2184 /sound
parentf9b8a51493d69841bab3c5e85f335b6af0c8e5c2 (diff)
ASoC: Convert omap directory to module_platform_driver
Factor out some boilerplate code. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/omap/omap-hdmi.c12
-rw-r--r--sound/soc/omap/omap-mcbsp.c12
-rw-r--r--sound/soc/omap/omap-mcpdm.c12
-rw-r--r--sound/soc/omap/omap-pcm.c12
-rw-r--r--sound/soc/omap/omap4-hdmi-card.c12
5 files changed, 5 insertions, 55 deletions
diff --git a/sound/soc/omap/omap-hdmi.c b/sound/soc/omap/omap-hdmi.c
index 9bb1cf89b4a4..38e0defa7078 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 = {
139 .remove = __devexit_p(omap_hdmi_remove), 139 .remove = __devexit_p(omap_hdmi_remove),
140}; 140};
141 141
142static int __init hdmi_dai_init(void) 142module_platform_driver(hdmi_dai_driver);
143{
144 return platform_driver_register(&hdmi_dai_driver);
145}
146module_init(hdmi_dai_init);
147
148static void __exit hdmi_dai_exit(void)
149{
150 platform_driver_unregister(&hdmi_dai_driver);
151}
152module_exit(hdmi_dai_exit);
153 143
154MODULE_AUTHOR("Jorge Candelaria <jorge.candelaria@ti.com>"); 144MODULE_AUTHOR("Jorge Candelaria <jorge.candelaria@ti.com>");
155MODULE_AUTHOR("Ricardo Neri <ricardo.neri@ti.com>"); 145MODULE_AUTHOR("Ricardo Neri <ricardo.neri@ti.com>");
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index d91e6efd2600..bd11d2568584 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 = {
785 .remove = __devexit_p(asoc_mcbsp_remove), 785 .remove = __devexit_p(asoc_mcbsp_remove),
786}; 786};
787 787
788static int __init snd_omap_mcbsp_init(void) 788module_platform_driver(asoc_mcbsp_driver);
789{
790 return platform_driver_register(&asoc_mcbsp_driver);
791}
792module_init(snd_omap_mcbsp_init);
793
794static void __exit snd_omap_mcbsp_exit(void)
795{
796 platform_driver_unregister(&asoc_mcbsp_driver);
797}
798module_exit(snd_omap_mcbsp_exit);
799 789
800MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@bitmer.com>"); 790MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@bitmer.com>");
801MODULE_DESCRIPTION("OMAP I2S SoC Interface"); 791MODULE_DESCRIPTION("OMAP I2S SoC Interface");
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
index cc8ceff25dbd..b50ac60be7db 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 = {
520 .remove = __devexit_p(asoc_mcpdm_remove), 520 .remove = __devexit_p(asoc_mcpdm_remove),
521}; 521};
522 522
523static int __init snd_omap_mcpdm_init(void) 523module_platform_driver(asoc_mcpdm_driver);
524{
525 return platform_driver_register(&asoc_mcpdm_driver);
526}
527module_init(snd_omap_mcpdm_init);
528
529static void __exit snd_omap_mcpdm_exit(void)
530{
531 platform_driver_unregister(&asoc_mcpdm_driver);
532}
533module_exit(snd_omap_mcpdm_exit);
534 524
535MODULE_AUTHOR("Misael Lopez Cruz <misael.lopez@ti.com>"); 525MODULE_AUTHOR("Misael Lopez Cruz <misael.lopez@ti.com>");
536MODULE_DESCRIPTION("OMAP PDM SoC Interface"); 526MODULE_DESCRIPTION("OMAP PDM SoC Interface");
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 6ede7dc6c10a..52a0f634948e 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 = {
433 .remove = __devexit_p(omap_pcm_remove), 433 .remove = __devexit_p(omap_pcm_remove),
434}; 434};
435 435
436static int __init snd_omap_pcm_init(void) 436module_platform_driver(omap_pcm_driver);
437{
438 return platform_driver_register(&omap_pcm_driver);
439}
440module_init(snd_omap_pcm_init);
441
442static void __exit snd_omap_pcm_exit(void)
443{
444 platform_driver_unregister(&omap_pcm_driver);
445}
446module_exit(snd_omap_pcm_exit);
447 437
448MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@bitmer.com>"); 438MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@bitmer.com>");
449MODULE_DESCRIPTION("OMAP PCM DMA module"); 439MODULE_DESCRIPTION("OMAP PCM DMA module");
diff --git a/sound/soc/omap/omap4-hdmi-card.c b/sound/soc/omap/omap4-hdmi-card.c
index 8671261ba16d..52d471c1eeed 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 = {
112 .remove = __devexit_p(omap4_hdmi_remove), 112 .remove = __devexit_p(omap4_hdmi_remove),
113}; 113};
114 114
115static int __init omap4_hdmi_init(void) 115module_platform_driver(omap4_hdmi_driver);
116{
117 return platform_driver_register(&omap4_hdmi_driver);
118}
119module_init(omap4_hdmi_init);
120
121static void __exit omap4_hdmi_exit(void)
122{
123 platform_driver_unregister(&omap4_hdmi_driver);
124}
125module_exit(omap4_hdmi_exit);
126 116
127MODULE_AUTHOR("Ricardo Neri <ricardo.neri@ti.com>"); 117MODULE_AUTHOR("Ricardo Neri <ricardo.neri@ti.com>");
128MODULE_DESCRIPTION("OMAP4 HDMI machine ASoC driver"); 118MODULE_DESCRIPTION("OMAP4 HDMI machine ASoC driver");