diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-24 01:21:29 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-24 05:45:18 -0500 |
commit | 85aa0960d8ef22edbb092446559b3b700a5512ef (patch) | |
tree | a020e82c3cfb2ff95369a9257a4b8425868882e7 /sound | |
parent | 880dd7210cd04205c6584922ad16b2d5731ab2c0 (diff) |
ASoC: Convert mxs directory to module_platform_driver
Factor out some boilerplate code.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/mxs/mxs-pcm.c | 12 | ||||
-rw-r--r-- | sound/soc/mxs/mxs-saif.c | 12 | ||||
-rw-r--r-- | sound/soc/mxs/mxs-sgtl5000.c | 12 |
3 files changed, 3 insertions, 33 deletions
diff --git a/sound/soc/mxs/mxs-pcm.c b/sound/soc/mxs/mxs-pcm.c index dea5aa4aa647..612ad3d9052d 100644 --- a/sound/soc/mxs/mxs-pcm.c +++ b/sound/soc/mxs/mxs-pcm.c | |||
@@ -346,14 +346,4 @@ static struct platform_driver mxs_pcm_driver = { | |||
346 | .remove = __devexit_p(mxs_soc_platform_remove), | 346 | .remove = __devexit_p(mxs_soc_platform_remove), |
347 | }; | 347 | }; |
348 | 348 | ||
349 | static int __init snd_mxs_pcm_init(void) | 349 | module_platform_driver(mxs_pcm_driver); |
350 | { | ||
351 | return platform_driver_register(&mxs_pcm_driver); | ||
352 | } | ||
353 | module_init(snd_mxs_pcm_init); | ||
354 | |||
355 | static void __exit snd_mxs_pcm_exit(void) | ||
356 | { | ||
357 | platform_driver_unregister(&mxs_pcm_driver); | ||
358 | } | ||
359 | module_exit(snd_mxs_pcm_exit); | ||
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index 46d76b52529b..1a13ab8b8e0d 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c | |||
@@ -781,18 +781,8 @@ static struct platform_driver mxs_saif_driver = { | |||
781 | }, | 781 | }, |
782 | }; | 782 | }; |
783 | 783 | ||
784 | static int __init mxs_saif_init(void) | 784 | module_platform_driver(mxs_saif_driver); |
785 | { | ||
786 | return platform_driver_register(&mxs_saif_driver); | ||
787 | } | ||
788 | |||
789 | static void __exit mxs_saif_exit(void) | ||
790 | { | ||
791 | platform_driver_unregister(&mxs_saif_driver); | ||
792 | } | ||
793 | 785 | ||
794 | module_init(mxs_saif_init); | ||
795 | module_exit(mxs_saif_exit); | ||
796 | MODULE_AUTHOR("Freescale Semiconductor, Inc."); | 786 | MODULE_AUTHOR("Freescale Semiconductor, Inc."); |
797 | MODULE_DESCRIPTION("MXS ASoC SAIF driver"); | 787 | MODULE_DESCRIPTION("MXS ASoC SAIF driver"); |
798 | MODULE_LICENSE("GPL"); | 788 | MODULE_LICENSE("GPL"); |
diff --git a/sound/soc/mxs/mxs-sgtl5000.c b/sound/soc/mxs/mxs-sgtl5000.c index 7fbeaec06eb4..200a9282b7cc 100644 --- a/sound/soc/mxs/mxs-sgtl5000.c +++ b/sound/soc/mxs/mxs-sgtl5000.c | |||
@@ -156,17 +156,7 @@ static struct platform_driver mxs_sgtl5000_audio_driver = { | |||
156 | .remove = __devexit_p(mxs_sgtl5000_remove), | 156 | .remove = __devexit_p(mxs_sgtl5000_remove), |
157 | }; | 157 | }; |
158 | 158 | ||
159 | static int __init mxs_sgtl5000_init(void) | 159 | module_platform_driver(mxs_sgtl5000_audio_driver); |
160 | { | ||
161 | return platform_driver_register(&mxs_sgtl5000_audio_driver); | ||
162 | } | ||
163 | module_init(mxs_sgtl5000_init); | ||
164 | |||
165 | static void __exit mxs_sgtl5000_exit(void) | ||
166 | { | ||
167 | platform_driver_unregister(&mxs_sgtl5000_audio_driver); | ||
168 | } | ||
169 | module_exit(mxs_sgtl5000_exit); | ||
170 | 160 | ||
171 | MODULE_AUTHOR("Freescale Semiconductor, Inc."); | 161 | MODULE_AUTHOR("Freescale Semiconductor, Inc."); |
172 | MODULE_DESCRIPTION("MXS ALSA SoC Machine driver"); | 162 | MODULE_DESCRIPTION("MXS ALSA SoC Machine driver"); |