]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: Convert imx directory to module_platform_driver
authorAxel Lin <axel.lin@gmail.com>
Thu, 24 Nov 2011 07:03:50 +0000 (15:03 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 24 Nov 2011 10:45:19 +0000 (10:45 +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/imx/imx-pcm-dma-mx2.c
sound/soc/imx/imx-pcm-fiq.c
sound/soc/imx/imx-ssi.c

index 43fdc24f7e8d6fdf323f096fee6c01682c433a24..1cf2fe889f6adaa885c77bf2c74da9dd9f56a3d8 100644 (file)
@@ -326,16 +326,6 @@ static struct platform_driver imx_pcm_driver = {
        .remove = __devexit_p(imx_soc_platform_remove),
 };
 
-static int __init snd_imx_pcm_init(void)
-{
-       return platform_driver_register(&imx_pcm_driver);
-}
-module_init(snd_imx_pcm_init);
-
-static void __exit snd_imx_pcm_exit(void)
-{
-       platform_driver_unregister(&imx_pcm_driver);
-}
-module_exit(snd_imx_pcm_exit);
+module_platform_driver(imx_pcm_driver);
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:imx-pcm-audio");
index 8df0fae21943b64d9bb99ffd462b679592a69742..d7ea0b3541245bbf5a3f81cf0398e19db2fea57b 100644 (file)
@@ -331,14 +331,4 @@ static struct platform_driver imx_pcm_driver = {
        .remove = __devexit_p(imx_soc_platform_remove),
 };
 
-static int __init snd_imx_pcm_init(void)
-{
-       return platform_driver_register(&imx_pcm_driver);
-}
-module_init(snd_imx_pcm_init);
-
-static void __exit snd_imx_pcm_exit(void)
-{
-       platform_driver_unregister(&imx_pcm_driver);
-}
-module_exit(snd_imx_pcm_exit);
+module_platform_driver(imx_pcm_driver);
index eed7041364e6d9bfe5892f083948b192f1e3d47c..01d1f749cf021908ead5cb27e30966a17f144ca6 100644 (file)
@@ -757,18 +757,7 @@ static struct platform_driver imx_ssi_driver = {
        },
 };
 
-static int __init imx_ssi_init(void)
-{
-       return platform_driver_register(&imx_ssi_driver);
-}
-
-static void __exit imx_ssi_exit(void)
-{
-       platform_driver_unregister(&imx_ssi_driver);
-}
-
-module_init(imx_ssi_init);
-module_exit(imx_ssi_exit);
+module_platform_driver(imx_ssi_driver);
 
 /* Module information */
 MODULE_AUTHOR("Sascha Hauer, <s.hauer@pengutronix.de>");