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

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Alexander Sverdlin <subaparts@yandex.ru>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/ep93xx/edb93xx.c
sound/soc/ep93xx/ep93xx-ac97.c
sound/soc/ep93xx/ep93xx-i2s.c
sound/soc/ep93xx/ep93xx-pcm.c
sound/soc/ep93xx/simone.c
sound/soc/ep93xx/snappercl15.c

index 51930b6a83af193f3f802df490df3f00b7930cd1..6b90c757cf4c1c60210ed6101bf0abc06bde6b95 100644 (file)
@@ -131,17 +131,7 @@ static struct platform_driver edb93xx_driver = {
        .remove         = __devexit_p(edb93xx_remove),
 };
 
-static int __init edb93xx_init(void)
-{
-       return platform_driver_register(&edb93xx_driver);
-}
-module_init(edb93xx_init);
-
-static void __exit edb93xx_exit(void)
-{
-       platform_driver_unregister(&edb93xx_driver);
-}
-module_exit(edb93xx_exit);
+module_platform_driver(edb93xx_driver);
 
 MODULE_AUTHOR("Alexander Sverdlin <subaparts@yandex.ru>");
 MODULE_DESCRIPTION("ALSA SoC EDB93xx");
index c423d12a26cf4806dae8f2b5c72fb22f18bc6f26..0678637abd66c6110524fa7bd3ee17d8e4abf8d9 100644 (file)
@@ -449,17 +449,7 @@ static struct platform_driver ep93xx_ac97_driver = {
        },
 };
 
-static int __init ep93xx_ac97_init(void)
-{
-       return platform_driver_register(&ep93xx_ac97_driver);
-}
-module_init(ep93xx_ac97_init);
-
-static void __exit ep93xx_ac97_exit(void)
-{
-       platform_driver_unregister(&ep93xx_ac97_driver);
-}
-module_exit(ep93xx_ac97_exit);
+module_platform_driver(ep93xx_ac97_driver);
 
 MODULE_DESCRIPTION("EP93xx AC97 ASoC Driver");
 MODULE_AUTHOR("Mika Westerberg <mika.westerberg@iki.fi>");
index 3dba128cc6f137a35ab949245e4cbd87075557b3..f7a62348e3fe022a3bc7ba4faa06b9e19f5c23a0 100644 (file)
@@ -464,18 +464,7 @@ static struct platform_driver ep93xx_i2s_driver = {
        },
 };
 
-static int __init ep93xx_i2s_init(void)
-{
-       return platform_driver_register(&ep93xx_i2s_driver);
-}
-
-static void __exit ep93xx_i2s_exit(void)
-{
-       platform_driver_unregister(&ep93xx_i2s_driver);
-}
-
-module_init(ep93xx_i2s_init);
-module_exit(ep93xx_i2s_exit);
+module_platform_driver(ep93xx_i2s_driver);
 
 MODULE_ALIAS("platform:ep93xx-i2s");
 MODULE_AUTHOR("Ryan Mallon");
index d00230a591b19efc8f4df849b7dbe07cb6cb665c..a2de9c42b702d4a841ba3dd0f8831b5d984273be 100644 (file)
@@ -339,18 +339,7 @@ static struct platform_driver ep93xx_pcm_driver = {
        .remove = __devexit_p(ep93xx_soc_platform_remove),
 };
 
-static int __init ep93xx_soc_platform_init(void)
-{
-       return platform_driver_register(&ep93xx_pcm_driver);
-}
-
-static void __exit ep93xx_soc_platform_exit(void)
-{
-       platform_driver_unregister(&ep93xx_pcm_driver);
-}
-
-module_init(ep93xx_soc_platform_init);
-module_exit(ep93xx_soc_platform_exit);
+module_platform_driver(ep93xx_pcm_driver);
 
 MODULE_AUTHOR("Ryan Mallon");
 MODULE_DESCRIPTION("EP93xx ALSA PCM interface");
index 968cb316d5115cf0d99bebf6d1fb1a47aef3a4e8..1e00b33cc50884be16e404e8f37a55c1e0b1b7d3 100644 (file)
@@ -81,17 +81,7 @@ static struct platform_driver simone_driver = {
        .remove         = __devexit_p(simone_remove),
 };
 
-static int __init simone_init(void)
-{
-       return platform_driver_register(&simone_driver);
-}
-module_init(simone_init);
-
-static void __exit simone_exit(void)
-{
-       platform_driver_unregister(&simone_driver);
-}
-module_exit(simone_exit);
+module_platform_driver(simone_driver);
 
 MODULE_DESCRIPTION("ALSA SoC Simplemachines Sim.One");
 MODULE_AUTHOR("Mika Westerberg <mika.westerberg@iki.fi>");
index 2cde43321eecc44545a9a1415c9b96d1780f3766..33901d647b728ab761ba41befb91d9225935b4ce 100644 (file)
@@ -147,18 +147,7 @@ static struct platform_driver snappercl15_driver = {
        .remove         = __devexit_p(snappercl15_remove),
 };
 
-static int __init snappercl15_init(void)
-{
-       return platform_driver_register(&snappercl15_driver);
-}
-
-static void __exit snappercl15_exit(void)
-{
-       platform_driver_unregister(&snappercl15_driver);
-}
-
-module_init(snappercl15_init);
-module_exit(snappercl15_exit);
+module_platform_driver(snappercl15_driver);
 
 MODULE_AUTHOR("Ryan Mallon");
 MODULE_DESCRIPTION("ALSA SoC Snapper CL15");