diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-24 21:12:16 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-25 08:15:31 -0500 |
commit | beda5bf575a93823289fbeb868b42e75e9f08d96 (patch) | |
tree | b33732aec1d0724f77fb48f96eb34766356d2184 /sound | |
parent | f9b8a51493d69841bab3c5e85f335b6af0c8e5c2 (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.c | 12 | ||||
-rw-r--r-- | sound/soc/omap/omap-mcbsp.c | 12 | ||||
-rw-r--r-- | sound/soc/omap/omap-mcpdm.c | 12 | ||||
-rw-r--r-- | sound/soc/omap/omap-pcm.c | 12 | ||||
-rw-r--r-- | 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 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 | ||
142 | static int __init hdmi_dai_init(void) | 142 | module_platform_driver(hdmi_dai_driver); |
143 | { | ||
144 | return platform_driver_register(&hdmi_dai_driver); | ||
145 | } | ||
146 | module_init(hdmi_dai_init); | ||
147 | |||
148 | static void __exit hdmi_dai_exit(void) | ||
149 | { | ||
150 | platform_driver_unregister(&hdmi_dai_driver); | ||
151 | } | ||
152 | module_exit(hdmi_dai_exit); | ||
153 | 143 | ||
154 | MODULE_AUTHOR("Jorge Candelaria <jorge.candelaria@ti.com>"); | 144 | MODULE_AUTHOR("Jorge Candelaria <jorge.candelaria@ti.com>"); |
155 | MODULE_AUTHOR("Ricardo Neri <ricardo.neri@ti.com>"); | 145 | 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 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 | ||
788 | static int __init snd_omap_mcbsp_init(void) | 788 | module_platform_driver(asoc_mcbsp_driver); |
789 | { | ||
790 | return platform_driver_register(&asoc_mcbsp_driver); | ||
791 | } | ||
792 | module_init(snd_omap_mcbsp_init); | ||
793 | |||
794 | static void __exit snd_omap_mcbsp_exit(void) | ||
795 | { | ||
796 | platform_driver_unregister(&asoc_mcbsp_driver); | ||
797 | } | ||
798 | module_exit(snd_omap_mcbsp_exit); | ||
799 | 789 | ||
800 | MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@bitmer.com>"); | 790 | MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@bitmer.com>"); |
801 | MODULE_DESCRIPTION("OMAP I2S SoC Interface"); | 791 | MODULE_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 | ||
523 | static int __init snd_omap_mcpdm_init(void) | 523 | module_platform_driver(asoc_mcpdm_driver); |
524 | { | ||
525 | return platform_driver_register(&asoc_mcpdm_driver); | ||
526 | } | ||
527 | module_init(snd_omap_mcpdm_init); | ||
528 | |||
529 | static void __exit snd_omap_mcpdm_exit(void) | ||
530 | { | ||
531 | platform_driver_unregister(&asoc_mcpdm_driver); | ||
532 | } | ||
533 | module_exit(snd_omap_mcpdm_exit); | ||
534 | 524 | ||
535 | MODULE_AUTHOR("Misael Lopez Cruz <misael.lopez@ti.com>"); | 525 | MODULE_AUTHOR("Misael Lopez Cruz <misael.lopez@ti.com>"); |
536 | MODULE_DESCRIPTION("OMAP PDM SoC Interface"); | 526 | MODULE_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 | ||
436 | static int __init snd_omap_pcm_init(void) | 436 | module_platform_driver(omap_pcm_driver); |
437 | { | ||
438 | return platform_driver_register(&omap_pcm_driver); | ||
439 | } | ||
440 | module_init(snd_omap_pcm_init); | ||
441 | |||
442 | static void __exit snd_omap_pcm_exit(void) | ||
443 | { | ||
444 | platform_driver_unregister(&omap_pcm_driver); | ||
445 | } | ||
446 | module_exit(snd_omap_pcm_exit); | ||
447 | 437 | ||
448 | MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@bitmer.com>"); | 438 | MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@bitmer.com>"); |
449 | MODULE_DESCRIPTION("OMAP PCM DMA module"); | 439 | 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 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 | ||
115 | static int __init omap4_hdmi_init(void) | 115 | module_platform_driver(omap4_hdmi_driver); |
116 | { | ||
117 | return platform_driver_register(&omap4_hdmi_driver); | ||
118 | } | ||
119 | module_init(omap4_hdmi_init); | ||
120 | |||
121 | static void __exit omap4_hdmi_exit(void) | ||
122 | { | ||
123 | platform_driver_unregister(&omap4_hdmi_driver); | ||
124 | } | ||
125 | module_exit(omap4_hdmi_exit); | ||
126 | 116 | ||
127 | MODULE_AUTHOR("Ricardo Neri <ricardo.neri@ti.com>"); | 117 | MODULE_AUTHOR("Ricardo Neri <ricardo.neri@ti.com>"); |
128 | MODULE_DESCRIPTION("OMAP4 HDMI machine ASoC driver"); | 118 | MODULE_DESCRIPTION("OMAP4 HDMI machine ASoC driver"); |