]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: Convert nuc900 directory to module_platform_driver
authorAxel Lin <axel.lin@gmail.com>
Thu, 24 Nov 2011 02:45:32 +0000 (10:45 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 24 Nov 2011 10:45:20 +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/nuc900/nuc900-ac97.c
sound/soc/nuc900/nuc900-pcm.c

index 7544d249807e2a0b0ee43ccc3eba8200fca19d14..f0c790451bd6d1fb1f92e38140086fe68a67598a 100644 (file)
@@ -405,18 +405,7 @@ static struct platform_driver nuc900_ac97_driver = {
        .remove         = __devexit_p(nuc900_ac97_drvremove),
 };
 
-static int __init nuc900_ac97_init(void)
-{
-       return platform_driver_register(&nuc900_ac97_driver);
-}
-
-static void __exit nuc900_ac97_exit(void)
-{
-       platform_driver_unregister(&nuc900_ac97_driver);
-}
-
-module_init(nuc900_ac97_init);
-module_exit(nuc900_ac97_exit);
+module_platform_driver(nuc900_ac97_driver);
 
 MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>");
 MODULE_DESCRIPTION("NUC900 AC97 SoC driver!");
index ae8d6806966ba935cbbebd3ec11c5bdaa82ad8c4..37585b47f4e3c4a5ea48ce7513ef08093de7e08d 100644 (file)
@@ -358,17 +358,7 @@ static struct platform_driver nuc900_pcm_driver = {
        .remove = __devexit_p(nuc900_soc_platform_remove),
 };
 
-static int __init nuc900_pcm_init(void)
-{
-       return platform_driver_register(&nuc900_pcm_driver);
-}
-module_init(nuc900_pcm_init);
-
-static void __exit nuc900_pcm_exit(void)
-{
-       platform_driver_unregister(&nuc900_pcm_driver);
-}
-module_exit(nuc900_pcm_exit);
+module_platform_driver(nuc900_pcm_driver);
 
 MODULE_AUTHOR("Wan ZongShun, <mcuos.com@gmail.com>");
 MODULE_DESCRIPTION("nuc900 Audio DMA module");