]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: Convert CODEC drivers to module_platform_driver
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 23 Nov 2011 22:52:08 +0000 (22:52 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 28 Nov 2011 11:33:29 +0000 (11:33 +0000)
Factors out a bit of boilerplate.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
26 files changed:
sound/soc/codecs/88pm860x-codec.c
sound/soc/codecs/ac97.c
sound/soc/codecs/ad1980.c
sound/soc/codecs/ad73311.c
sound/soc/codecs/ads117x.c
sound/soc/codecs/cq93vc.c
sound/soc/codecs/cx20442.c
sound/soc/codecs/dfbmcs320.c
sound/soc/codecs/dmic.c
sound/soc/codecs/jz4740.c
sound/soc/codecs/pcm3008.c
sound/soc/codecs/sn95031.c
sound/soc/codecs/spdif_transciever.c
sound/soc/codecs/stac9766.c
sound/soc/codecs/twl4030.c
sound/soc/codecs/twl6040.c
sound/soc/codecs/uda134x.c
sound/soc/codecs/wl1273.c
sound/soc/codecs/wm8350.c
sound/soc/codecs/wm8400.c
sound/soc/codecs/wm8727.c
sound/soc/codecs/wm8782.c
sound/soc/codecs/wm8994.c
sound/soc/codecs/wm9705.c
sound/soc/codecs/wm9712.c
sound/soc/codecs/wm9713.c

index ea305b88cb55be1d99047d0a095b6e242b1d775e..2d39123dd21a990576ca4b2b37d6ff0d438ad075 100644 (file)
@@ -1481,17 +1481,7 @@ static struct platform_driver pm860x_codec_driver = {
        .remove = __devexit_p(pm860x_codec_remove),
 };
 
-static __init int pm860x_init(void)
-{
-       return platform_driver_register(&pm860x_codec_driver);
-}
-module_init(pm860x_init);
-
-static __exit void pm860x_exit(void)
-{
-       platform_driver_unregister(&pm860x_codec_driver);
-}
-module_exit(pm860x_exit);
+module_platform_driver(pm860x_codec_driver);
 
 MODULE_DESCRIPTION("ASoC 88PM860x driver");
 MODULE_AUTHOR("Haojian Zhuang <haojian.zhuang@marvell.com>");
index 8f3216793eb596d93afeaa0981a3870de3a40ed6..221ec29f68e38361cb073ff0c975de51f47e7762 100644 (file)
@@ -148,17 +148,7 @@ static struct platform_driver ac97_codec_driver = {
        .remove = __devexit_p(ac97_remove),
 };
 
-static int __init ac97_init(void)
-{
-       return platform_driver_register(&ac97_codec_driver);
-}
-module_init(ac97_init);
-
-static void __exit ac97_exit(void)
-{
-       platform_driver_unregister(&ac97_codec_driver);
-}
-module_exit(ac97_exit);
+module_platform_driver(ac97_codec_driver);
 
 MODULE_DESCRIPTION("Soc Generic AC97 driver");
 MODULE_AUTHOR("Liam Girdwood");
index e3931cc5e66c6736d75fa053e7755acfda7a8b8e..9bba7f849464391778e5c33f0076c0e20b3ea44f 100644 (file)
@@ -277,17 +277,7 @@ static struct platform_driver ad1980_codec_driver = {
        .remove = __devexit_p(ad1980_remove),
 };
 
-static int __init ad1980_init(void)
-{
-       return platform_driver_register(&ad1980_codec_driver);
-}
-module_init(ad1980_init);
-
-static void __exit ad1980_exit(void)
-{
-       platform_driver_unregister(&ad1980_codec_driver);
-}
-module_exit(ad1980_exit);
+module_platform_driver(ad1980_codec_driver);
 
 MODULE_DESCRIPTION("ASoC ad1980 driver (Obsolete)");
 MODULE_AUTHOR("Roy Huang, Cliff Cai");
index 8d793e993e9a8a7110d2601141649a72072baee6..ee7a68dcefd2442b1650b16395025bc2eed39990 100644 (file)
@@ -63,17 +63,7 @@ static struct platform_driver ad73311_codec_driver = {
        .remove = __devexit_p(ad73311_remove),
 };
 
-static int __init ad73311_init(void)
-{
-       return platform_driver_register(&ad73311_codec_driver);
-}
-module_init(ad73311_init);
-
-static void __exit ad73311_exit(void)
-{
-       platform_driver_unregister(&ad73311_codec_driver);
-}
-module_exit(ad73311_exit);
+module_platform_driver(ad73311_codec_driver);
 
 MODULE_DESCRIPTION("ASoC ad73311 driver");
 MODULE_AUTHOR("Cliff Cai ");
index 9082e0f729f307d626cd467bc0c777993cd987f8..8103b938b8c001214858e9a628ae60908424cde3 100644 (file)
@@ -58,17 +58,7 @@ static struct platform_driver ads117x_codec_driver = {
        .remove = __devexit_p(ads117x_remove),
 };
 
-static int __init ads117x_init(void)
-{
-       return platform_driver_register(&ads117x_codec_driver);
-}
-module_init(ads117x_init);
-
-static void __exit ads117x_exit(void)
-{
-       platform_driver_unregister(&ads117x_codec_driver);
-}
-module_exit(ads117x_exit);
+module_platform_driver(ads117x_codec_driver);
 
 MODULE_DESCRIPTION("ASoC ads117x driver");
 MODULE_AUTHOR("Graeme Gregory");
index cbb3028e2008456c0b487f1a66027a6073d8a695..4854b472d5fdb98ca5d6cae18863286a17f3b408 100644 (file)
@@ -206,17 +206,7 @@ static struct platform_driver cq93vc_codec_driver = {
        .remove = __devexit_p(cq93vc_platform_remove),
 };
 
-static int __init cq93vc_init(void)
-{
-       return platform_driver_register(&cq93vc_codec_driver);
-}
-module_init(cq93vc_init);
-
-static void __exit cq93vc_exit(void)
-{
-       platform_driver_unregister(&cq93vc_codec_driver);
-}
-module_exit(cq93vc_exit);
+module_platform_driver(cq93vc_codec_driver);
 
 MODULE_DESCRIPTION("Texas Instruments DaVinci ASoC CQ0093 Voice Codec Driver");
 MODULE_AUTHOR("Miguel Aguilar");
index bc7067db8ae4ec54697c4163e23f97af3670bd19..ae55e31bfc721172c7210cc48b2c6706fc0d9831 100644 (file)
@@ -391,17 +391,7 @@ static struct platform_driver cx20442_platform_driver = {
        .remove = __exit_p(cx20442_platform_remove),
 };
 
-static int __init cx20442_init(void)
-{
-       return platform_driver_register(&cx20442_platform_driver);
-}
-module_init(cx20442_init);
-
-static void __exit cx20442_exit(void)
-{
-       platform_driver_unregister(&cx20442_platform_driver);
-}
-module_exit(cx20442_exit);
+module_platform_driver(cx20442_platform_driver);
 
 MODULE_DESCRIPTION("ASoC CX20442-11 voice modem codec driver");
 MODULE_AUTHOR("Janusz Krzysztofik");
index 704bbde65737577aec3739fa4159307a70f61ee2..bfe46aa90362fe262b7894d0bd9451ad3042f23f 100644 (file)
@@ -55,17 +55,7 @@ static struct platform_driver dfmcs320_driver = {
        .remove = __devexit_p(dfbmcs320_remove),
 };
 
-static int __init dfbmcs320_init(void)
-{
-       return platform_driver_register(&dfmcs320_driver);
-}
-module_init(dfbmcs320_init);
-
-static void __exit dfbmcs320_exit(void)
-{
-       platform_driver_unregister(&dfmcs320_driver);
-}
-module_exit(dfbmcs320_exit);
+module_platform_driver(dfmcs320_driver);
 
 MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
 MODULE_DESCRIPTION("ASoC DFBM-CS320 bluethooth module driver");
index 6fae765e3ad8baf3611f7251bd3240e2c6591a06..3e929f079a1f0eb4b3fa472482d68503703da8c4 100644 (file)
@@ -89,17 +89,7 @@ static struct platform_driver dmic_driver = {
        .remove = __devexit_p(dmic_dev_remove),
 };
 
-static int __init dmic_init(void)
-{
-       return platform_driver_register(&dmic_driver);
-}
-module_init(dmic_init);
-
-static void __exit dmic_exit(void)
-{
-       platform_driver_unregister(&dmic_driver);
-}
-module_exit(dmic_exit);
+module_platform_driver(dmic_driver);
 
 MODULE_DESCRIPTION("Generic DMIC driver");
 MODULE_AUTHOR("Liam Girdwood <lrg@slimlogic.co.uk>");
index 64a479c3429a8fb63c6eeed169b3c7cb25b1799b..4fca8bccd53573f2bacffe88bdead55288e3d3a3 100644 (file)
@@ -424,17 +424,7 @@ static struct platform_driver jz4740_codec_driver = {
        },
 };
 
-static int __init jz4740_codec_init(void)
-{
-       return platform_driver_register(&jz4740_codec_driver);
-}
-module_init(jz4740_codec_init);
-
-static void __exit jz4740_codec_exit(void)
-{
-       platform_driver_unregister(&jz4740_codec_driver);
-}
-module_exit(jz4740_codec_exit);
+module_platform_driver(jz4740_codec_driver);
 
 MODULE_DESCRIPTION("JZ4740 SoC internal codec driver");
 MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
index f7316519432c42dcdb6122bd17009672217ad72f..b12d01f67990a5591a6700b01b75d535b0382145 100644 (file)
@@ -172,17 +172,7 @@ static struct platform_driver pcm3008_codec_driver = {
        },
 };
 
-static int __init pcm3008_modinit(void)
-{
-       return platform_driver_register(&pcm3008_codec_driver);
-}
-module_init(pcm3008_modinit);
-
-static void __exit pcm3008_exit(void)
-{
-       platform_driver_unregister(&pcm3008_codec_driver);
-}
-module_exit(pcm3008_exit);
+module_platform_driver(pcm3008_codec_driver);
 
 MODULE_DESCRIPTION("Soc PCM3008 driver");
 MODULE_AUTHOR("Hugo Villeneuve");
index 65f2ef986c4f13df8e0063e202d078ca613052ed..f99baa0b8c39133b5cbc342368b4ac98f79cb365 100644 (file)
@@ -920,19 +920,7 @@ static struct platform_driver sn95031_codec_driver = {
        .remove         = __devexit_p(sn95031_device_remove),
 };
 
-static int __init sn95031_init(void)
-{
-       pr_debug("driver init called\n");
-       return platform_driver_register(&sn95031_codec_driver);
-}
-module_init(sn95031_init);
-
-static void __exit sn95031_exit(void)
-{
-       pr_debug("driver exit called\n");
-       platform_driver_unregister(&sn95031_codec_driver);
-}
-module_exit(sn95031_exit);
+module_platform_driver(sn95031_codec_driver);
 
 MODULE_DESCRIPTION("ASoC TI SN95031 codec driver");
 MODULE_AUTHOR("Vinod Koul <vinod.koul@intel.com>");
index 6a1a7e705cd767ffd11365252c88b70fe7c98ad1..112a49d66e3967847517b495872baa606a967189 100644 (file)
@@ -61,18 +61,7 @@ static struct platform_driver spdif_dit_driver = {
        },
 };
 
-static int __init dit_modinit(void)
-{
-       return platform_driver_register(&spdif_dit_driver);
-}
-
-static void __exit dit_exit(void)
-{
-       platform_driver_unregister(&spdif_dit_driver);
-}
-
-module_init(dit_modinit);
-module_exit(dit_exit);
+module_platform_driver(spdif_dit_driver);
 
 MODULE_AUTHOR("Steve Chen <schen@mvista.com>");
 MODULE_DESCRIPTION("SPDIF dummy codec driver");
index e4783a4f71fd4c481f62540cc302722a4b938166..55819537b6776c0f3cc9569c9337cb43a97d86b1 100644 (file)
@@ -408,17 +408,7 @@ static struct platform_driver stac9766_codec_driver = {
        .remove = __devexit_p(stac9766_remove),
 };
 
-static int __init stac9766_init(void)
-{
-       return platform_driver_register(&stac9766_codec_driver);
-}
-module_init(stac9766_init);
-
-static void __exit stac9766_exit(void)
-{
-       platform_driver_unregister(&stac9766_codec_driver);
-}
-module_exit(stac9766_exit);
+module_platform_driver(stac9766_codec_driver);
 
 MODULE_DESCRIPTION("ASoC stac9766 driver");
 MODULE_AUTHOR("Jon Smirl <jonsmirl@gmail.com>");
index 2a3a52838e9c39f16727b34c3a1d5cd123830d89..61d8a9065ff3cb8f779e8aa1be9c9cd3f47ea3b1 100644 (file)
@@ -2294,17 +2294,7 @@ static struct platform_driver twl4030_codec_driver = {
        },
 };
 
-static int __init twl4030_modinit(void)
-{
-       return platform_driver_register(&twl4030_codec_driver);
-}
-module_init(twl4030_modinit);
-
-static void __exit twl4030_exit(void)
-{
-       platform_driver_unregister(&twl4030_codec_driver);
-}
-module_exit(twl4030_exit);
+module_platform_driver(twl4030_codec_driver);
 
 MODULE_DESCRIPTION("ASoC TWL4030 codec driver");
 MODULE_AUTHOR("Steve Sakoman");
index 17930edd3a2ccc84cfbfcbc86c03ff07ccb60ebf..a4a65dc9e33afaa69fe85d1a26d3f6b60fd035d5 100644 (file)
@@ -1620,17 +1620,7 @@ static struct platform_driver twl6040_codec_driver = {
        .remove = __devexit_p(twl6040_codec_remove),
 };
 
-static int __init twl6040_codec_init(void)
-{
-       return platform_driver_register(&twl6040_codec_driver);
-}
-module_init(twl6040_codec_init);
-
-static void __exit twl6040_codec_exit(void)
-{
-       platform_driver_unregister(&twl6040_codec_driver);
-}
-module_exit(twl6040_codec_exit);
+module_platform_driver(twl6040_codec_driver);
 
 MODULE_DESCRIPTION("ASoC TWL6040 codec driver");
 MODULE_AUTHOR("Misael Lopez Cruz");
index 486aef637eeddb6ee05d4b0b4b5768f1a6a371eb..d0f9d904ce8f8420161166a981f8767d886f553e 100644 (file)
@@ -625,17 +625,7 @@ static struct platform_driver uda134x_codec_driver = {
        .remove = __devexit_p(uda134x_codec_remove),
 };
 
-static int __init uda134x_codec_init(void)
-{
-       return platform_driver_register(&uda134x_codec_driver);
-}
-module_init(uda134x_codec_init);
-
-static void __exit uda134x_codec_exit(void)
-{
-       platform_driver_unregister(&uda134x_codec_driver);
-}
-module_exit(uda134x_codec_exit);
+module_platform_driver(uda134x_codec_driver);
 
 MODULE_DESCRIPTION("UDA134X ALSA soc codec driver");
 MODULE_AUTHOR("Zoltan Devai, Christian Pellegrin <chripell@evolware.org>");
index 9531c35dccadfa4e27a8c7b505ec588a328df6ca..44aacf927ba99d6a533524b39859eac9d565c265 100644 (file)
@@ -510,17 +510,7 @@ static struct platform_driver wl1273_platform_driver = {
        .remove         = __devexit_p(wl1273_platform_remove),
 };
 
-static int __init wl1273_init(void)
-{
-       return platform_driver_register(&wl1273_platform_driver);
-}
-module_init(wl1273_init);
-
-static void __exit wl1273_exit(void)
-{
-       platform_driver_unregister(&wl1273_platform_driver);
-}
-module_exit(wl1273_exit);
+module_platform_driver(wl1273_platform_driver);
 
 MODULE_AUTHOR("Matti Aaltonen <matti.j.aaltonen@nokia.com>");
 MODULE_DESCRIPTION("ASoC WL1273 codec driver");
index 3b846c95f07faf11a7c0acb250690e4fb3214bff..3f1ed5f5ccf4208a147606f60bb9b66e0ac42c41 100644 (file)
@@ -1711,17 +1711,7 @@ static struct platform_driver wm8350_codec_driver = {
        .remove = __devexit_p(wm8350_remove),
 };
 
-static __init int wm8350_init(void)
-{
-       return platform_driver_register(&wm8350_codec_driver);
-}
-module_init(wm8350_init);
-
-static __exit void wm8350_exit(void)
-{
-       platform_driver_unregister(&wm8350_codec_driver);
-}
-module_exit(wm8350_exit);
+module_platform_driver(wm8350_codec_driver);
 
 MODULE_DESCRIPTION("ASoC WM8350 driver");
 MODULE_AUTHOR("Liam Girdwood");
index 07d84a86e14efefe952ed10ed28d7c72b0b78e89..a1173eb7936d46071d0c82bf93ff50961165532e 100644 (file)
@@ -1477,17 +1477,7 @@ static struct platform_driver wm8400_codec_driver = {
        .remove = __devexit_p(wm8400_remove),
 };
 
-static __init int wm8400_init(void)
-{
-       return platform_driver_register(&wm8400_codec_driver);
-}
-module_init(wm8400_init);
-
-static __exit void wm8400_exit(void)
-{
-       platform_driver_unregister(&wm8400_codec_driver);
-}
-module_exit(wm8400_exit);
+module_platform_driver(wm8400_codec_driver);
 
 MODULE_DESCRIPTION("ASoC WM8400 driver");
 MODULE_AUTHOR("Mark Brown");
index 7488082851191ce120a8a66fd8704b53613b8189..fad90a35f3999cafbee0c8e683f16b6f1e35558b 100644 (file)
@@ -67,17 +67,7 @@ static struct platform_driver wm8727_codec_driver = {
        .remove = __devexit_p(wm8727_remove),
 };
 
-static int __init wm8727_init(void)
-{
-       return platform_driver_register(&wm8727_codec_driver);
-}
-module_init(wm8727_init);
-
-static void __exit wm8727_exit(void)
-{
-       platform_driver_unregister(&wm8727_codec_driver);
-}
-module_exit(wm8727_exit);
+module_platform_driver(wm8727_codec_driver);
 
 MODULE_DESCRIPTION("ASoC wm8727 driver");
 MODULE_AUTHOR("Neil Jones");
index f2ced71328b0a6cc7ee073a4099fd6fd6afe5b15..3fdea98f732ec3814dd96f2150ffa5fe4c6b4349 100644 (file)
@@ -63,17 +63,7 @@ static struct platform_driver wm8782_codec_driver = {
        .remove = __devexit_p(wm8782_remove),
 };
 
-static int __init wm8782_init(void)
-{
-       return platform_driver_register(&wm8782_codec_driver);
-}
-module_init(wm8782_init);
-
-static void __exit wm8782_exit(void)
-{
-       platform_driver_unregister(&wm8782_codec_driver);
-}
-module_exit(wm8782_exit);
+module_platform_driver(wm8782_codec_driver);
 
 MODULE_DESCRIPTION("ASoC WM8782 driver");
 MODULE_AUTHOR("Johannes Stezenbach <js@sig21.net>");
index 73db9806c4757cb1a4811ed095aa378acb8291b5..380e3f2f3190605bd158a217dffb7dc869fefa90 100644 (file)
@@ -3579,18 +3579,7 @@ static struct platform_driver wm8994_codec_driver = {
        .remove = __devexit_p(wm8994_remove),
 };
 
-static __init int wm8994_init(void)
-{
-       return platform_driver_register(&wm8994_codec_driver);
-}
-module_init(wm8994_init);
-
-static __exit void wm8994_exit(void)
-{
-       platform_driver_unregister(&wm8994_codec_driver);
-}
-module_exit(wm8994_exit);
-
+module_platform_driver(wm8994_codec_driver);
 
 MODULE_DESCRIPTION("ASoC WM8994 driver");
 MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
index edf603281ce7dbd1b7269839cfa0e98943ea5635..b720a43c422c1935017baa8e5a198a01522af059 100644 (file)
@@ -406,17 +406,7 @@ static struct platform_driver wm9705_codec_driver = {
        .remove = __devexit_p(wm9705_remove),
 };
 
-static int __init wm9705_init(void)
-{
-       return platform_driver_register(&wm9705_codec_driver);
-}
-module_init(wm9705_init);
-
-static void __exit wm9705_exit(void)
-{
-       platform_driver_unregister(&wm9705_codec_driver);
-}
-module_exit(wm9705_exit);
+module_platform_driver(wm9705_codec_driver);
 
 MODULE_DESCRIPTION("ASoC WM9705 driver");
 MODULE_AUTHOR("Ian Molton");
index fd1812704af824bb755093d362d54968717e016d..4ce73f59df2071336862e07a9b467fdc40d1fa1f 100644 (file)
@@ -694,17 +694,7 @@ static struct platform_driver wm9712_codec_driver = {
        .remove = __devexit_p(wm9712_remove),
 };
 
-static int __init wm9712_init(void)
-{
-       return platform_driver_register(&wm9712_codec_driver);
-}
-module_init(wm9712_init);
-
-static void __exit wm9712_exit(void)
-{
-       platform_driver_unregister(&wm9712_codec_driver);
-}
-module_exit(wm9712_exit);
+module_platform_driver(wm9712_codec_driver);
 
 MODULE_DESCRIPTION("ASoC WM9711/WM9712 driver");
 MODULE_AUTHOR("Liam Girdwood");
index 09360b60037c5753f1061da6b3a32d469b740f98..edb598182c696d1a930970b34b9ad81b71616713 100644 (file)
@@ -1277,17 +1277,7 @@ static struct platform_driver wm9713_codec_driver = {
        .remove = __devexit_p(wm9713_remove),
 };
 
-static int __init wm9713_init(void)
-{
-       return platform_driver_register(&wm9713_codec_driver);
-}
-module_init(wm9713_init);
-
-static void __exit wm9713_exit(void)
-{
-       platform_driver_unregister(&wm9713_codec_driver);
-}
-module_exit(wm9713_exit);
+module_platform_driver(wm9713_codec_driver);
 
 MODULE_DESCRIPTION("ASoC WM9713/WM9714 driver");
 MODULE_AUTHOR("Liam Girdwood");