diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-24 21:15:07 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-25 08:15:29 -0500 |
commit | cb5e87387cfa8172faca36682e2df069b006efdf (patch) | |
tree | 2d547197742fda15a5a3f7e746a470518059eb32 /sound/soc | |
parent | 2f702a19154ddbd294825c0588593e1eef10b1e2 (diff) |
ASoC: Convert sh directory to module_platform_driver
Factor out some boilerplate code.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/sh/dma-sh7760.c | 12 | ||||
-rw-r--r-- | sound/soc/sh/fsi-ak4642.c | 13 | ||||
-rw-r--r-- | sound/soc/sh/fsi-hdmi.c | 13 | ||||
-rw-r--r-- | sound/soc/sh/fsi.c | 13 | ||||
-rw-r--r-- | sound/soc/sh/hac.c | 12 | ||||
-rw-r--r-- | sound/soc/sh/siu_dai.c | 13 | ||||
-rw-r--r-- | 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 db74005f37ce..7da20186b19e 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 = { | |||
369 | .remove = __devexit_p(sh7760_soc_platform_remove), | 369 | .remove = __devexit_p(sh7760_soc_platform_remove), |
370 | }; | 370 | }; |
371 | 371 | ||
372 | static int __init snd_sh7760_pcm_init(void) | 372 | module_platform_driver(sh7760_pcm_driver); |
373 | { | ||
374 | return platform_driver_register(&sh7760_pcm_driver); | ||
375 | } | ||
376 | module_init(snd_sh7760_pcm_init); | ||
377 | |||
378 | static void __exit snd_sh7760_pcm_exit(void) | ||
379 | { | ||
380 | platform_driver_unregister(&sh7760_pcm_driver); | ||
381 | } | ||
382 | module_exit(snd_sh7760_pcm_exit); | ||
383 | 373 | ||
384 | MODULE_LICENSE("GPL"); | 374 | MODULE_LICENSE("GPL"); |
385 | MODULE_DESCRIPTION("SH7760 Audio DMA (DMABRG) driver"); | 375 | MODULE_DESCRIPTION("SH7760 Audio DMA (DMABRG) driver"); |
diff --git a/sound/soc/sh/fsi-ak4642.c b/sound/soc/sh/fsi-ak4642.c index 11d2d7ff29d9..eb52778d0f90 100644 --- a/sound/soc/sh/fsi-ak4642.c +++ b/sound/soc/sh/fsi-ak4642.c | |||
@@ -100,18 +100,7 @@ static struct platform_driver fsi_ak4642 = { | |||
100 | .remove = fsi_ak4642_remove, | 100 | .remove = fsi_ak4642_remove, |
101 | }; | 101 | }; |
102 | 102 | ||
103 | static int __init fsi_ak4642_init(void) | 103 | module_platform_driver(fsi_ak4642); |
104 | { | ||
105 | return platform_driver_register(&fsi_ak4642); | ||
106 | } | ||
107 | |||
108 | static void __exit fsi_ak4642_exit(void) | ||
109 | { | ||
110 | platform_driver_unregister(&fsi_ak4642); | ||
111 | } | ||
112 | |||
113 | module_init(fsi_ak4642_init); | ||
114 | module_exit(fsi_ak4642_exit); | ||
115 | 104 | ||
116 | MODULE_LICENSE("GPL"); | 105 | MODULE_LICENSE("GPL"); |
117 | MODULE_DESCRIPTION("Generic SH4 FSI-AK4642 sound card"); | 106 | 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 3ebebe706ad3..621aea155ac1 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 = { | |||
110 | .id_table = fsi_id_table, | 110 | .id_table = fsi_id_table, |
111 | }; | 111 | }; |
112 | 112 | ||
113 | static int __init fsi_hdmi_init(void) | 113 | module_platform_driver(fsi_hdmi); |
114 | { | ||
115 | return platform_driver_register(&fsi_hdmi); | ||
116 | } | ||
117 | |||
118 | static void __exit fsi_hdmi_exit(void) | ||
119 | { | ||
120 | platform_driver_unregister(&fsi_hdmi); | ||
121 | } | ||
122 | |||
123 | module_init(fsi_hdmi_init); | ||
124 | module_exit(fsi_hdmi_exit); | ||
125 | 114 | ||
126 | MODULE_LICENSE("GPL"); | 115 | MODULE_LICENSE("GPL"); |
127 | MODULE_DESCRIPTION("Generic SH4 FSI-HDMI sound card"); | 116 | MODULE_DESCRIPTION("Generic SH4 FSI-HDMI sound card"); |
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index aa3033075a0d..a27c30636b82 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c | |||
@@ -1468,18 +1468,7 @@ static struct platform_driver fsi_driver = { | |||
1468 | .id_table = fsi_id_table, | 1468 | .id_table = fsi_id_table, |
1469 | }; | 1469 | }; |
1470 | 1470 | ||
1471 | static int __init fsi_mobile_init(void) | 1471 | module_platform_driver(fsi_driver); |
1472 | { | ||
1473 | return platform_driver_register(&fsi_driver); | ||
1474 | } | ||
1475 | |||
1476 | static void __exit fsi_mobile_exit(void) | ||
1477 | { | ||
1478 | platform_driver_unregister(&fsi_driver); | ||
1479 | } | ||
1480 | |||
1481 | module_init(fsi_mobile_init); | ||
1482 | module_exit(fsi_mobile_exit); | ||
1483 | 1472 | ||
1484 | MODULE_LICENSE("GPL"); | 1473 | MODULE_LICENSE("GPL"); |
1485 | MODULE_DESCRIPTION("SuperH onchip FSI audio driver"); | 1474 | MODULE_DESCRIPTION("SuperH onchip FSI audio driver"); |
diff --git a/sound/soc/sh/hac.c b/sound/soc/sh/hac.c index a1f307b9a82d..3474d7befe5a 100644 --- a/sound/soc/sh/hac.c +++ b/sound/soc/sh/hac.c | |||
@@ -332,17 +332,7 @@ static struct platform_driver hac_pcm_driver = { | |||
332 | .remove = __devexit_p(hac_soc_platform_remove), | 332 | .remove = __devexit_p(hac_soc_platform_remove), |
333 | }; | 333 | }; |
334 | 334 | ||
335 | static int __init sh4_hac_pcm_init(void) | 335 | module_platform_driver(hac_pcm_driver); |
336 | { | ||
337 | return platform_driver_register(&hac_pcm_driver); | ||
338 | } | ||
339 | module_init(sh4_hac_pcm_init); | ||
340 | |||
341 | static void __exit sh4_hac_pcm_exit(void) | ||
342 | { | ||
343 | platform_driver_unregister(&hac_pcm_driver); | ||
344 | } | ||
345 | module_exit(sh4_hac_pcm_exit); | ||
346 | 336 | ||
347 | MODULE_LICENSE("GPL"); | 337 | MODULE_LICENSE("GPL"); |
348 | MODULE_DESCRIPTION("SuperH onchip HAC (AC97) audio driver"); | 338 | 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 93dea49ff1a7..11c608570820 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 = { | |||
852 | .remove = __devexit_p(siu_remove), | 852 | .remove = __devexit_p(siu_remove), |
853 | }; | 853 | }; |
854 | 854 | ||
855 | static int __init siu_init(void) | 855 | module_platform_driver(siu_driver); |
856 | { | ||
857 | return platform_driver_register(&siu_driver); | ||
858 | } | ||
859 | |||
860 | static void __exit siu_exit(void) | ||
861 | { | ||
862 | platform_driver_unregister(&siu_driver); | ||
863 | } | ||
864 | |||
865 | module_init(siu_init) | ||
866 | module_exit(siu_exit) | ||
867 | 856 | ||
868 | MODULE_AUTHOR("Carlos Munoz <carlos@kenati.com>"); | 857 | MODULE_AUTHOR("Carlos Munoz <carlos@kenati.com>"); |
869 | MODULE_DESCRIPTION("ALSA SoC SH7722 SIU driver"); | 858 | MODULE_DESCRIPTION("ALSA SoC SH7722 SIU driver"); |
diff --git a/sound/soc/sh/ssi.c b/sound/soc/sh/ssi.c index 1fda16a00e6a..ff82b56a8860 100644 --- a/sound/soc/sh/ssi.c +++ b/sound/soc/sh/ssi.c | |||
@@ -401,17 +401,7 @@ static struct platform_driver sh4_ssi_driver = { | |||
401 | .remove = __devexit_p(sh4_soc_dai_remove), | 401 | .remove = __devexit_p(sh4_soc_dai_remove), |
402 | }; | 402 | }; |
403 | 403 | ||
404 | static int __init snd_sh4_ssi_init(void) | 404 | module_platform_driver(sh4_ssi_driver); |
405 | { | ||
406 | return platform_driver_register(&sh4_ssi_driver); | ||
407 | } | ||
408 | module_init(snd_sh4_ssi_init); | ||
409 | |||
410 | static void __exit snd_sh4_ssi_exit(void) | ||
411 | { | ||
412 | platform_driver_unregister(&sh4_ssi_driver); | ||
413 | } | ||
414 | module_exit(snd_sh4_ssi_exit); | ||
415 | 405 | ||
416 | MODULE_LICENSE("GPL"); | 406 | MODULE_LICENSE("GPL"); |
417 | MODULE_DESCRIPTION("SuperH onchip SSI (I2S) audio driver"); | 407 | MODULE_DESCRIPTION("SuperH onchip SSI (I2S) audio driver"); |