ASoC: Convert jz4740 directory to module_platform_driver
authorAxel Lin <axel.lin@gmail.com>
Thu, 24 Nov 2011 02:13:03 +0000 (10:13 +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/jz4740/jz4740-i2s.c
sound/soc/jz4740/jz4740-pcm.c

index 91255c6e1ee73e5d36263378e87edc87b2a3e27e..a5af7c42e62bb7ce641e13d3635c3c5312fc167b 100644 (file)
@@ -519,17 +519,7 @@ static struct platform_driver jz4740_i2s_driver = {
        },
 };
 
-static int __init jz4740_i2s_init(void)
-{
-       return platform_driver_register(&jz4740_i2s_driver);
-}
-module_init(jz4740_i2s_init);
-
-static void __exit jz4740_i2s_exit(void)
-{
-       platform_driver_unregister(&jz4740_i2s_driver);
-}
-module_exit(jz4740_i2s_exit);
+module_platform_driver(jz4740_i2s_driver);
 
 MODULE_AUTHOR("Lars-Peter Clausen, <lars@metafoo.de>");
 MODULE_DESCRIPTION("Ingenic JZ4740 SoC I2S driver");
index d1989cde9f14d0d442531066f96b2a6e9c4f3525..50cda9ea915644baf3d93a02ec8b10e7e24d61d9 100644 (file)
@@ -356,17 +356,7 @@ static struct platform_driver jz4740_pcm_driver = {
        },
 };
 
-static int __init jz4740_soc_platform_init(void)
-{
-       return platform_driver_register(&jz4740_pcm_driver);
-}
-module_init(jz4740_soc_platform_init);
-
-static void __exit jz4740_soc_platform_exit(void)
-{
-       return platform_driver_unregister(&jz4740_pcm_driver);
-}
-module_exit(jz4740_soc_platform_exit);
+module_platform_driver(jz4740_pcm_driver);
 
 MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
 MODULE_DESCRIPTION("Ingenic SoC JZ4740 PCM driver");