ASoC: Convert pxa directory to module_platform_driver
authorAxel Lin <axel.lin@gmail.com>
Fri, 25 Nov 2011 02:13:37 +0000 (10:13 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 25 Nov 2011 13:15:16 +0000 (13:15 +0000)
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>
sound/soc/pxa/hx4700.c
sound/soc/pxa/mioa701_wm9713.c
sound/soc/pxa/palm27x.c
sound/soc/pxa/pxa-ssp.c
sound/soc/pxa/pxa2xx-ac97.c
sound/soc/pxa/pxa2xx-pcm.c

index 65c124831a0063f0b645062a13559348e5af367a..e32afaf1ebbb44a467eaf802093902e4fdf9c18d 100644 (file)
@@ -236,18 +236,7 @@ static struct platform_driver hx4700_audio_driver = {
        .remove = __devexit_p(hx4700_audio_remove),
 };
 
-static int __init hx4700_modinit(void)
-{
-       return platform_driver_register(&hx4700_audio_driver);
-}
-module_init(hx4700_modinit);
-
-static void __exit hx4700_modexit(void)
-{
-       platform_driver_unregister(&hx4700_audio_driver);
-}
-
-module_exit(hx4700_modexit);
+module_platform_driver(hx4700_audio_driver);
 
 MODULE_AUTHOR("Philipp Zabel");
 MODULE_DESCRIPTION("ALSA SoC iPAQ hx4700");
index 0b8d1ee738a45ae82c2e3dc22efca0d2ab6c152a..0e73a7f718e42d2f66d47529b9f749685281093e 100644 (file)
@@ -227,18 +227,7 @@ static struct platform_driver mioa701_wm9713_driver = {
        },
 };
 
-static int __init mioa701_asoc_init(void)
-{
-       return platform_driver_register(&mioa701_wm9713_driver);
-}
-
-static void __exit mioa701_asoc_exit(void)
-{
-       platform_driver_unregister(&mioa701_wm9713_driver);
-}
-
-module_init(mioa701_asoc_init);
-module_exit(mioa701_asoc_exit);
+module_platform_driver(mioa701_wm9713_driver);
 
 /* Module information */
 MODULE_AUTHOR("Robert Jarzmik (rjarzmik@free.fr)");
index 7edc1fb71fae05288eebd25ce16d82d122c83227..f313eca40fdc96cb5fcd39b1d4df3f4f18ee9358 100644 (file)
@@ -201,18 +201,7 @@ static struct platform_driver palm27x_wm9712_driver = {
        },
 };
 
-static int __init palm27x_asoc_init(void)
-{
-       return platform_driver_register(&palm27x_wm9712_driver);
-}
-
-static void __exit palm27x_asoc_exit(void)
-{
-       platform_driver_unregister(&palm27x_wm9712_driver);
-}
-
-module_init(palm27x_asoc_init);
-module_exit(palm27x_asoc_exit);
+module_platform_driver(palm27x_wm9712_driver);
 
 /* Module information */
 MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
index 9c9a51ef67c3747b91784813f99df6b400b87e89..a57cfbc038e3cc1522c33b98d9fd648203948337 100644 (file)
@@ -825,17 +825,7 @@ static struct platform_driver asoc_ssp_driver = {
        .remove = __devexit_p(asoc_ssp_remove),
 };
 
-static int __init pxa_ssp_init(void)
-{
-       return platform_driver_register(&asoc_ssp_driver);
-}
-module_init(pxa_ssp_init);
-
-static void __exit pxa_ssp_exit(void)
-{
-       platform_driver_unregister(&asoc_ssp_driver);
-}
-module_exit(pxa_ssp_exit);
+module_platform_driver(asoc_ssp_driver);
 
 /* Module information */
 MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
index 3fec2f35b8f89e812ab3808e3a77a020cb7f7312..837ff341fd6dda45954f2ec34fd263f24a54d62e 100644 (file)
@@ -263,17 +263,7 @@ static struct platform_driver pxa2xx_ac97_driver = {
        },
 };
 
-static int __init pxa_ac97_init(void)
-{
-       return platform_driver_register(&pxa2xx_ac97_driver);
-}
-module_init(pxa_ac97_init);
-
-static void __exit pxa_ac97_exit(void)
-{
-       platform_driver_unregister(&pxa2xx_ac97_driver);
-}
-module_exit(pxa_ac97_exit);
+module_platform_driver(pxa2xx_ac97_driver);
 
 MODULE_AUTHOR("Nicolas Pitre");
 MODULE_DESCRIPTION("AC97 driver for the Intel PXA2xx chip");
index 600676f709a927b2c4a568d03fd8869dafff721a..fdd6bedef9bd7d818dadf36049df53ed067d842d 100644 (file)
@@ -141,17 +141,7 @@ static struct platform_driver pxa_pcm_driver = {
        .remove = __devexit_p(pxa2xx_soc_platform_remove),
 };
 
-static int __init snd_pxa_pcm_init(void)
-{
-       return platform_driver_register(&pxa_pcm_driver);
-}
-module_init(snd_pxa_pcm_init);
-
-static void __exit snd_pxa_pcm_exit(void)
-{
-       platform_driver_unregister(&pxa_pcm_driver);
-}
-module_exit(snd_pxa_pcm_exit);
+module_platform_driver(pxa_pcm_driver);
 
 MODULE_AUTHOR("Nicolas Pitre");
 MODULE_DESCRIPTION("Intel PXA2xx PCM DMA module");