ASoC: Convert s6000 directory to module_platform_driver
authorAxel Lin <axel.lin@gmail.com>
Thu, 24 Nov 2011 04:14:56 +0000 (12:14 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 24 Nov 2011 10:45:14 +0000 (10:45 +0000)
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/s6000/s6000-i2s.c
sound/soc/s6000/s6000-pcm.c

index 13716a9317fbd81c40ca357d3b6d46a900a58d8c..aaabdbaec19c6cf389f887669af54a3558f16aba 100644 (file)
@@ -604,17 +604,7 @@ static struct platform_driver s6000_i2s_driver = {
        },
 };
 
-static int __init s6000_i2s_init(void)
-{
-       return platform_driver_register(&s6000_i2s_driver);
-}
-module_init(s6000_i2s_init);
-
-static void __exit s6000_i2s_exit(void)
-{
-       platform_driver_unregister(&s6000_i2s_driver);
-}
-module_exit(s6000_i2s_exit);
+module_platform_driver(s6000_i2s_driver);
 
 MODULE_AUTHOR("Daniel Gloeckner");
 MODULE_DESCRIPTION("Stretch s6000 family I2S SoC Interface");
index 55efc2bdf0bd0a4fd73f938299764222601a5014..43c014f362f60643a9f5f4d798a2c651b6c0af1b 100644 (file)
@@ -520,17 +520,7 @@ static struct platform_driver s6000_pcm_driver = {
        .remove = __devexit_p(s6000_soc_platform_remove),
 };
 
-static int __init snd_s6000_pcm_init(void)
-{
-       return platform_driver_register(&s6000_pcm_driver);
-}
-module_init(snd_s6000_pcm_init);
-
-static void __exit snd_s6000_pcm_exit(void)
-{
-       platform_driver_unregister(&s6000_pcm_driver);
-}
-module_exit(snd_s6000_pcm_exit);
+module_platform_driver(s6000_pcm_driver);
 
 MODULE_AUTHOR("Daniel Gloeckner");
 MODULE_DESCRIPTION("Stretch s6000 family PCM DMA module");