ASoC: Convert davinci directory to module_platform_driver
authorAxel Lin <axel.lin@gmail.com>
Fri, 25 Nov 2011 02:09:27 +0000 (10:09 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 25 Nov 2011 13:15:31 +0000 (13:15 +0000)
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/davinci/davinci-i2s.c
sound/soc/davinci/davinci-mcasp.c
sound/soc/davinci/davinci-pcm.c
sound/soc/davinci/davinci-vcif.c

index f3d5ae1078be67dfff48d70cc5ee44a94b68a0d0..ec187100367edd98585c27ecd9dfef908410ad20 100644 (file)
@@ -774,17 +774,7 @@ static struct platform_driver davinci_mcbsp_driver = {
        },
 };
 
-static int __init davinci_i2s_init(void)
-{
-       return platform_driver_register(&davinci_mcbsp_driver);
-}
-module_init(davinci_i2s_init);
-
-static void __exit davinci_i2s_exit(void)
-{
-       platform_driver_unregister(&davinci_mcbsp_driver);
-}
-module_exit(davinci_i2s_exit);
+module_platform_driver(davinci_mcbsp_driver);
 
 MODULE_AUTHOR("Vladimir Barinov");
 MODULE_DESCRIPTION("TI DAVINCI I2S (McBSP) SoC Interface");
index 03cea9d39c4b3aaf51ef05ac03630f9d914bdd49..2152ff5c04f66df8aacfcd4a2fa0e429f64af5a2 100644 (file)
@@ -991,17 +991,7 @@ static struct platform_driver davinci_mcasp_driver = {
        },
 };
 
-static int __init davinci_mcasp_init(void)
-{
-       return platform_driver_register(&davinci_mcasp_driver);
-}
-module_init(davinci_mcasp_init);
-
-static void __exit davinci_mcasp_exit(void)
-{
-       platform_driver_unregister(&davinci_mcasp_driver);
-}
-module_exit(davinci_mcasp_exit);
+module_platform_driver(davinci_mcasp_driver);
 
 MODULE_AUTHOR("Steve Chen");
 MODULE_DESCRIPTION("TI DAVINCI McASP SoC Interface");
index d5fe08cc5db7ec83efbfcb2b8b13d6094c2bf986..65bff3d30dd757909ca2e0a59bb6ec214b676d79 100644 (file)
@@ -886,17 +886,7 @@ static struct platform_driver davinci_pcm_driver = {
        .remove = __devexit_p(davinci_soc_platform_remove),
 };
 
-static int __init snd_davinci_pcm_init(void)
-{
-       return platform_driver_register(&davinci_pcm_driver);
-}
-module_init(snd_davinci_pcm_init);
-
-static void __exit snd_davinci_pcm_exit(void)
-{
-       platform_driver_unregister(&davinci_pcm_driver);
-}
-module_exit(snd_davinci_pcm_exit);
+module_platform_driver(davinci_pcm_driver);
 
 MODULE_AUTHOR("Vladimir Barinov");
 MODULE_DESCRIPTION("TI DAVINCI PCM DMA module");
index dae96b85fd6d641e825ddf31a39eb7e5418b5508..70ce10c5d9982310a4ac1c6a5c82042ad6442bcd 100644 (file)
@@ -265,17 +265,7 @@ static struct platform_driver davinci_vcif_driver = {
        },
 };
 
-static int __init davinci_vcif_init(void)
-{
-       return platform_driver_probe(&davinci_vcif_driver, davinci_vcif_probe);
-}
-module_init(davinci_vcif_init);
-
-static void __exit davinci_vcif_exit(void)
-{
-       platform_driver_unregister(&davinci_vcif_driver);
-}
-module_exit(davinci_vcif_exit);
+module_platform_driver(davinci_vcif_driver);
 
 MODULE_AUTHOR("Miguel Aguilar");
 MODULE_DESCRIPTION("Texas Instruments DaVinci ASoC Voice Codec Interface");