diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-24 02:03:50 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-24 05:45:19 -0500 |
commit | 7a24b2ba59fda5e6d1367d5d3cb0d4d0f811713b (patch) | |
tree | ab0d3c100acd0316aeaf7c1a824e3b4b9b2ebacf | |
parent | fb80297e4379640653b525e897b65b0b05a5b845 (diff) |
ASoC: Convert imx 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>
-rw-r--r-- | sound/soc/imx/imx-pcm-dma-mx2.c | 12 | ||||
-rw-r--r-- | sound/soc/imx/imx-pcm-fiq.c | 12 | ||||
-rw-r--r-- | sound/soc/imx/imx-ssi.c | 13 |
3 files changed, 3 insertions, 34 deletions
diff --git a/sound/soc/imx/imx-pcm-dma-mx2.c b/sound/soc/imx/imx-pcm-dma-mx2.c index 43fdc24f7e8d..1cf2fe889f6a 100644 --- a/sound/soc/imx/imx-pcm-dma-mx2.c +++ b/sound/soc/imx/imx-pcm-dma-mx2.c | |||
@@ -326,16 +326,6 @@ static struct platform_driver imx_pcm_driver = { | |||
326 | .remove = __devexit_p(imx_soc_platform_remove), | 326 | .remove = __devexit_p(imx_soc_platform_remove), |
327 | }; | 327 | }; |
328 | 328 | ||
329 | static int __init snd_imx_pcm_init(void) | 329 | module_platform_driver(imx_pcm_driver); |
330 | { | ||
331 | return platform_driver_register(&imx_pcm_driver); | ||
332 | } | ||
333 | module_init(snd_imx_pcm_init); | ||
334 | |||
335 | static void __exit snd_imx_pcm_exit(void) | ||
336 | { | ||
337 | platform_driver_unregister(&imx_pcm_driver); | ||
338 | } | ||
339 | module_exit(snd_imx_pcm_exit); | ||
340 | MODULE_LICENSE("GPL"); | 330 | MODULE_LICENSE("GPL"); |
341 | MODULE_ALIAS("platform:imx-pcm-audio"); | 331 | MODULE_ALIAS("platform:imx-pcm-audio"); |
diff --git a/sound/soc/imx/imx-pcm-fiq.c b/sound/soc/imx/imx-pcm-fiq.c index 8df0fae21943..d7ea0b354124 100644 --- a/sound/soc/imx/imx-pcm-fiq.c +++ b/sound/soc/imx/imx-pcm-fiq.c | |||
@@ -331,14 +331,4 @@ static struct platform_driver imx_pcm_driver = { | |||
331 | .remove = __devexit_p(imx_soc_platform_remove), | 331 | .remove = __devexit_p(imx_soc_platform_remove), |
332 | }; | 332 | }; |
333 | 333 | ||
334 | static int __init snd_imx_pcm_init(void) | 334 | module_platform_driver(imx_pcm_driver); |
335 | { | ||
336 | return platform_driver_register(&imx_pcm_driver); | ||
337 | } | ||
338 | module_init(snd_imx_pcm_init); | ||
339 | |||
340 | static void __exit snd_imx_pcm_exit(void) | ||
341 | { | ||
342 | platform_driver_unregister(&imx_pcm_driver); | ||
343 | } | ||
344 | module_exit(snd_imx_pcm_exit); | ||
diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c index eed7041364e6..01d1f749cf02 100644 --- a/sound/soc/imx/imx-ssi.c +++ b/sound/soc/imx/imx-ssi.c | |||
@@ -757,18 +757,7 @@ static struct platform_driver imx_ssi_driver = { | |||
757 | }, | 757 | }, |
758 | }; | 758 | }; |
759 | 759 | ||
760 | static int __init imx_ssi_init(void) | 760 | module_platform_driver(imx_ssi_driver); |
761 | { | ||
762 | return platform_driver_register(&imx_ssi_driver); | ||
763 | } | ||
764 | |||
765 | static void __exit imx_ssi_exit(void) | ||
766 | { | ||
767 | platform_driver_unregister(&imx_ssi_driver); | ||
768 | } | ||
769 | |||
770 | module_init(imx_ssi_init); | ||
771 | module_exit(imx_ssi_exit); | ||
772 | 761 | ||
773 | /* Module information */ | 762 | /* Module information */ |
774 | MODULE_AUTHOR("Sascha Hauer, <s.hauer@pengutronix.de>"); | 763 | MODULE_AUTHOR("Sascha Hauer, <s.hauer@pengutronix.de>"); |