2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-20 03:04:01 +08:00

ASoC: Convert CODEC drivers to module_platform_driver

Factors out a bit of boilerplate.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Mark Brown 2011-11-23 22:52:08 +00:00
parent be086aa8ca
commit 5bbcc3c0d0
26 changed files with 26 additions and 290 deletions

View 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>");

View 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");

View 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");

View 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 ");

View 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");

View 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");

View 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");

View 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");

View 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>");

View 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>");

View 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");

View 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>");

View 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");

View 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>");

View 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");

View 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");

View 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>");

View 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");

View 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");

View 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");

View 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");

View 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>");

View 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>");

View 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");

View 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");

View 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");