diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-24 21:13:37 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-25 08:15:16 -0500 |
commit | 2f702a19154ddbd294825c0588593e1eef10b1e2 (patch) | |
tree | 55c940af293dbe308420924c0df88c8c2b7af647 /sound/soc/pxa | |
parent | 8a124f9cc9bafc40f5650e63a84ba1ff98a36ea0 (diff) |
ASoC: Convert pxa directory to module_platform_driver
Factor out some boilerplate code.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/pxa')
-rw-r--r-- | sound/soc/pxa/hx4700.c | 13 | ||||
-rw-r--r-- | sound/soc/pxa/mioa701_wm9713.c | 13 | ||||
-rw-r--r-- | sound/soc/pxa/palm27x.c | 13 | ||||
-rw-r--r-- | sound/soc/pxa/pxa-ssp.c | 12 | ||||
-rw-r--r-- | sound/soc/pxa/pxa2xx-ac97.c | 12 | ||||
-rw-r--r-- | 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 65c124831a00..e32afaf1ebbb 100644 --- a/sound/soc/pxa/hx4700.c +++ b/sound/soc/pxa/hx4700.c | |||
@@ -236,18 +236,7 @@ static struct platform_driver hx4700_audio_driver = { | |||
236 | .remove = __devexit_p(hx4700_audio_remove), | 236 | .remove = __devexit_p(hx4700_audio_remove), |
237 | }; | 237 | }; |
238 | 238 | ||
239 | static int __init hx4700_modinit(void) | 239 | module_platform_driver(hx4700_audio_driver); |
240 | { | ||
241 | return platform_driver_register(&hx4700_audio_driver); | ||
242 | } | ||
243 | module_init(hx4700_modinit); | ||
244 | |||
245 | static void __exit hx4700_modexit(void) | ||
246 | { | ||
247 | platform_driver_unregister(&hx4700_audio_driver); | ||
248 | } | ||
249 | |||
250 | module_exit(hx4700_modexit); | ||
251 | 240 | ||
252 | MODULE_AUTHOR("Philipp Zabel"); | 241 | MODULE_AUTHOR("Philipp Zabel"); |
253 | MODULE_DESCRIPTION("ALSA SoC iPAQ hx4700"); | 242 | MODULE_DESCRIPTION("ALSA SoC iPAQ hx4700"); |
diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c index 0b8d1ee738a4..0e73a7f718e4 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 = { | |||
227 | }, | 227 | }, |
228 | }; | 228 | }; |
229 | 229 | ||
230 | static int __init mioa701_asoc_init(void) | 230 | module_platform_driver(mioa701_wm9713_driver); |
231 | { | ||
232 | return platform_driver_register(&mioa701_wm9713_driver); | ||
233 | } | ||
234 | |||
235 | static void __exit mioa701_asoc_exit(void) | ||
236 | { | ||
237 | platform_driver_unregister(&mioa701_wm9713_driver); | ||
238 | } | ||
239 | |||
240 | module_init(mioa701_asoc_init); | ||
241 | module_exit(mioa701_asoc_exit); | ||
242 | 231 | ||
243 | /* Module information */ | 232 | /* Module information */ |
244 | MODULE_AUTHOR("Robert Jarzmik (rjarzmik@free.fr)"); | 233 | MODULE_AUTHOR("Robert Jarzmik (rjarzmik@free.fr)"); |
diff --git a/sound/soc/pxa/palm27x.c b/sound/soc/pxa/palm27x.c index 7edc1fb71fae..f313eca40fdc 100644 --- a/sound/soc/pxa/palm27x.c +++ b/sound/soc/pxa/palm27x.c | |||
@@ -201,18 +201,7 @@ static struct platform_driver palm27x_wm9712_driver = { | |||
201 | }, | 201 | }, |
202 | }; | 202 | }; |
203 | 203 | ||
204 | static int __init palm27x_asoc_init(void) | 204 | module_platform_driver(palm27x_wm9712_driver); |
205 | { | ||
206 | return platform_driver_register(&palm27x_wm9712_driver); | ||
207 | } | ||
208 | |||
209 | static void __exit palm27x_asoc_exit(void) | ||
210 | { | ||
211 | platform_driver_unregister(&palm27x_wm9712_driver); | ||
212 | } | ||
213 | |||
214 | module_init(palm27x_asoc_init); | ||
215 | module_exit(palm27x_asoc_exit); | ||
216 | 205 | ||
217 | /* Module information */ | 206 | /* Module information */ |
218 | MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>"); | 207 | 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 9c9a51ef67c3..a57cfbc038e3 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 = { | |||
825 | .remove = __devexit_p(asoc_ssp_remove), | 825 | .remove = __devexit_p(asoc_ssp_remove), |
826 | }; | 826 | }; |
827 | 827 | ||
828 | static int __init pxa_ssp_init(void) | 828 | module_platform_driver(asoc_ssp_driver); |
829 | { | ||
830 | return platform_driver_register(&asoc_ssp_driver); | ||
831 | } | ||
832 | module_init(pxa_ssp_init); | ||
833 | |||
834 | static void __exit pxa_ssp_exit(void) | ||
835 | { | ||
836 | platform_driver_unregister(&asoc_ssp_driver); | ||
837 | } | ||
838 | module_exit(pxa_ssp_exit); | ||
839 | 829 | ||
840 | /* Module information */ | 830 | /* Module information */ |
841 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); | 831 | 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 3fec2f35b8f8..837ff341fd6d 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 = { | |||
263 | }, | 263 | }, |
264 | }; | 264 | }; |
265 | 265 | ||
266 | static int __init pxa_ac97_init(void) | 266 | module_platform_driver(pxa2xx_ac97_driver); |
267 | { | ||
268 | return platform_driver_register(&pxa2xx_ac97_driver); | ||
269 | } | ||
270 | module_init(pxa_ac97_init); | ||
271 | |||
272 | static void __exit pxa_ac97_exit(void) | ||
273 | { | ||
274 | platform_driver_unregister(&pxa2xx_ac97_driver); | ||
275 | } | ||
276 | module_exit(pxa_ac97_exit); | ||
277 | 267 | ||
278 | MODULE_AUTHOR("Nicolas Pitre"); | 268 | MODULE_AUTHOR("Nicolas Pitre"); |
279 | MODULE_DESCRIPTION("AC97 driver for the Intel PXA2xx chip"); | 269 | 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 600676f709a9..fdd6bedef9bd 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 = { | |||
141 | .remove = __devexit_p(pxa2xx_soc_platform_remove), | 141 | .remove = __devexit_p(pxa2xx_soc_platform_remove), |
142 | }; | 142 | }; |
143 | 143 | ||
144 | static int __init snd_pxa_pcm_init(void) | 144 | module_platform_driver(pxa_pcm_driver); |
145 | { | ||
146 | return platform_driver_register(&pxa_pcm_driver); | ||
147 | } | ||
148 | module_init(snd_pxa_pcm_init); | ||
149 | |||
150 | static void __exit snd_pxa_pcm_exit(void) | ||
151 | { | ||
152 | platform_driver_unregister(&pxa_pcm_driver); | ||
153 | } | ||
154 | module_exit(snd_pxa_pcm_exit); | ||
155 | 145 | ||
156 | MODULE_AUTHOR("Nicolas Pitre"); | 146 | MODULE_AUTHOR("Nicolas Pitre"); |
157 | MODULE_DESCRIPTION("Intel PXA2xx PCM DMA module"); | 147 | MODULE_DESCRIPTION("Intel PXA2xx PCM DMA module"); |