提交 5bbcc3c0 编写于 作者: M Mark Brown

ASoC: Convert CODEC drivers to module_platform_driver

Factors out a bit of boilerplate.
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 be086aa8
...@@ -1481,17 +1481,7 @@ static struct platform_driver pm860x_codec_driver = { ...@@ -1481,17 +1481,7 @@ static struct platform_driver pm860x_codec_driver = {
.remove = __devexit_p(pm860x_codec_remove), .remove = __devexit_p(pm860x_codec_remove),
}; };
static __init int pm860x_init(void) module_platform_driver(pm860x_codec_driver);
{
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_DESCRIPTION("ASoC 88PM860x driver"); MODULE_DESCRIPTION("ASoC 88PM860x driver");
MODULE_AUTHOR("Haojian Zhuang <haojian.zhuang@marvell.com>"); MODULE_AUTHOR("Haojian Zhuang <haojian.zhuang@marvell.com>");
......
...@@ -148,17 +148,7 @@ static struct platform_driver ac97_codec_driver = { ...@@ -148,17 +148,7 @@ static struct platform_driver ac97_codec_driver = {
.remove = __devexit_p(ac97_remove), .remove = __devexit_p(ac97_remove),
}; };
static int __init ac97_init(void) module_platform_driver(ac97_codec_driver);
{
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_DESCRIPTION("Soc Generic AC97 driver"); MODULE_DESCRIPTION("Soc Generic AC97 driver");
MODULE_AUTHOR("Liam Girdwood"); MODULE_AUTHOR("Liam Girdwood");
......
...@@ -277,17 +277,7 @@ static struct platform_driver ad1980_codec_driver = { ...@@ -277,17 +277,7 @@ static struct platform_driver ad1980_codec_driver = {
.remove = __devexit_p(ad1980_remove), .remove = __devexit_p(ad1980_remove),
}; };
static int __init ad1980_init(void) module_platform_driver(ad1980_codec_driver);
{
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_DESCRIPTION("ASoC ad1980 driver (Obsolete)"); MODULE_DESCRIPTION("ASoC ad1980 driver (Obsolete)");
MODULE_AUTHOR("Roy Huang, Cliff Cai"); MODULE_AUTHOR("Roy Huang, Cliff Cai");
......
...@@ -63,17 +63,7 @@ static struct platform_driver ad73311_codec_driver = { ...@@ -63,17 +63,7 @@ static struct platform_driver ad73311_codec_driver = {
.remove = __devexit_p(ad73311_remove), .remove = __devexit_p(ad73311_remove),
}; };
static int __init ad73311_init(void) module_platform_driver(ad73311_codec_driver);
{
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_DESCRIPTION("ASoC ad73311 driver"); MODULE_DESCRIPTION("ASoC ad73311 driver");
MODULE_AUTHOR("Cliff Cai "); MODULE_AUTHOR("Cliff Cai ");
......
...@@ -58,17 +58,7 @@ static struct platform_driver ads117x_codec_driver = { ...@@ -58,17 +58,7 @@ static struct platform_driver ads117x_codec_driver = {
.remove = __devexit_p(ads117x_remove), .remove = __devexit_p(ads117x_remove),
}; };
static int __init ads117x_init(void) module_platform_driver(ads117x_codec_driver);
{
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_DESCRIPTION("ASoC ads117x driver"); MODULE_DESCRIPTION("ASoC ads117x driver");
MODULE_AUTHOR("Graeme Gregory"); MODULE_AUTHOR("Graeme Gregory");
......
...@@ -206,17 +206,7 @@ static struct platform_driver cq93vc_codec_driver = { ...@@ -206,17 +206,7 @@ static struct platform_driver cq93vc_codec_driver = {
.remove = __devexit_p(cq93vc_platform_remove), .remove = __devexit_p(cq93vc_platform_remove),
}; };
static int __init cq93vc_init(void) module_platform_driver(cq93vc_codec_driver);
{
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_DESCRIPTION("Texas Instruments DaVinci ASoC CQ0093 Voice Codec Driver"); MODULE_DESCRIPTION("Texas Instruments DaVinci ASoC CQ0093 Voice Codec Driver");
MODULE_AUTHOR("Miguel Aguilar"); MODULE_AUTHOR("Miguel Aguilar");
......
...@@ -391,17 +391,7 @@ static struct platform_driver cx20442_platform_driver = { ...@@ -391,17 +391,7 @@ static struct platform_driver cx20442_platform_driver = {
.remove = __exit_p(cx20442_platform_remove), .remove = __exit_p(cx20442_platform_remove),
}; };
static int __init cx20442_init(void) module_platform_driver(cx20442_platform_driver);
{
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_DESCRIPTION("ASoC CX20442-11 voice modem codec driver"); MODULE_DESCRIPTION("ASoC CX20442-11 voice modem codec driver");
MODULE_AUTHOR("Janusz Krzysztofik"); MODULE_AUTHOR("Janusz Krzysztofik");
......
...@@ -55,17 +55,7 @@ static struct platform_driver dfmcs320_driver = { ...@@ -55,17 +55,7 @@ static struct platform_driver dfmcs320_driver = {
.remove = __devexit_p(dfbmcs320_remove), .remove = __devexit_p(dfbmcs320_remove),
}; };
static int __init dfbmcs320_init(void) module_platform_driver(dfmcs320_driver);
{
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_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
MODULE_DESCRIPTION("ASoC DFBM-CS320 bluethooth module driver"); MODULE_DESCRIPTION("ASoC DFBM-CS320 bluethooth module driver");
......
...@@ -89,17 +89,7 @@ static struct platform_driver dmic_driver = { ...@@ -89,17 +89,7 @@ static struct platform_driver dmic_driver = {
.remove = __devexit_p(dmic_dev_remove), .remove = __devexit_p(dmic_dev_remove),
}; };
static int __init dmic_init(void) module_platform_driver(dmic_driver);
{
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_DESCRIPTION("Generic DMIC driver"); MODULE_DESCRIPTION("Generic DMIC driver");
MODULE_AUTHOR("Liam Girdwood <lrg@slimlogic.co.uk>"); MODULE_AUTHOR("Liam Girdwood <lrg@slimlogic.co.uk>");
......
...@@ -424,17 +424,7 @@ static struct platform_driver jz4740_codec_driver = { ...@@ -424,17 +424,7 @@ static struct platform_driver jz4740_codec_driver = {
}, },
}; };
static int __init jz4740_codec_init(void) module_platform_driver(jz4740_codec_driver);
{
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_DESCRIPTION("JZ4740 SoC internal codec driver"); MODULE_DESCRIPTION("JZ4740 SoC internal codec driver");
MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
......
...@@ -172,17 +172,7 @@ static struct platform_driver pcm3008_codec_driver = { ...@@ -172,17 +172,7 @@ static struct platform_driver pcm3008_codec_driver = {
}, },
}; };
static int __init pcm3008_modinit(void) module_platform_driver(pcm3008_codec_driver);
{
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_DESCRIPTION("Soc PCM3008 driver"); MODULE_DESCRIPTION("Soc PCM3008 driver");
MODULE_AUTHOR("Hugo Villeneuve"); MODULE_AUTHOR("Hugo Villeneuve");
......
...@@ -920,19 +920,7 @@ static struct platform_driver sn95031_codec_driver = { ...@@ -920,19 +920,7 @@ static struct platform_driver sn95031_codec_driver = {
.remove = __devexit_p(sn95031_device_remove), .remove = __devexit_p(sn95031_device_remove),
}; };
static int __init sn95031_init(void) module_platform_driver(sn95031_codec_driver);
{
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_DESCRIPTION("ASoC TI SN95031 codec driver"); MODULE_DESCRIPTION("ASoC TI SN95031 codec driver");
MODULE_AUTHOR("Vinod Koul <vinod.koul@intel.com>"); MODULE_AUTHOR("Vinod Koul <vinod.koul@intel.com>");
......
...@@ -61,18 +61,7 @@ static struct platform_driver spdif_dit_driver = { ...@@ -61,18 +61,7 @@ static struct platform_driver spdif_dit_driver = {
}, },
}; };
static int __init dit_modinit(void) module_platform_driver(spdif_dit_driver);
{
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_AUTHOR("Steve Chen <schen@mvista.com>"); MODULE_AUTHOR("Steve Chen <schen@mvista.com>");
MODULE_DESCRIPTION("SPDIF dummy codec driver"); MODULE_DESCRIPTION("SPDIF dummy codec driver");
......
...@@ -408,17 +408,7 @@ static struct platform_driver stac9766_codec_driver = { ...@@ -408,17 +408,7 @@ static struct platform_driver stac9766_codec_driver = {
.remove = __devexit_p(stac9766_remove), .remove = __devexit_p(stac9766_remove),
}; };
static int __init stac9766_init(void) module_platform_driver(stac9766_codec_driver);
{
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_DESCRIPTION("ASoC stac9766 driver"); MODULE_DESCRIPTION("ASoC stac9766 driver");
MODULE_AUTHOR("Jon Smirl <jonsmirl@gmail.com>"); MODULE_AUTHOR("Jon Smirl <jonsmirl@gmail.com>");
......
...@@ -2294,17 +2294,7 @@ static struct platform_driver twl4030_codec_driver = { ...@@ -2294,17 +2294,7 @@ static struct platform_driver twl4030_codec_driver = {
}, },
}; };
static int __init twl4030_modinit(void) module_platform_driver(twl4030_codec_driver);
{
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_DESCRIPTION("ASoC TWL4030 codec driver"); MODULE_DESCRIPTION("ASoC TWL4030 codec driver");
MODULE_AUTHOR("Steve Sakoman"); MODULE_AUTHOR("Steve Sakoman");
......
...@@ -1620,17 +1620,7 @@ static struct platform_driver twl6040_codec_driver = { ...@@ -1620,17 +1620,7 @@ static struct platform_driver twl6040_codec_driver = {
.remove = __devexit_p(twl6040_codec_remove), .remove = __devexit_p(twl6040_codec_remove),
}; };
static int __init twl6040_codec_init(void) module_platform_driver(twl6040_codec_driver);
{
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_DESCRIPTION("ASoC TWL6040 codec driver"); MODULE_DESCRIPTION("ASoC TWL6040 codec driver");
MODULE_AUTHOR("Misael Lopez Cruz"); MODULE_AUTHOR("Misael Lopez Cruz");
......
...@@ -625,17 +625,7 @@ static struct platform_driver uda134x_codec_driver = { ...@@ -625,17 +625,7 @@ static struct platform_driver uda134x_codec_driver = {
.remove = __devexit_p(uda134x_codec_remove), .remove = __devexit_p(uda134x_codec_remove),
}; };
static int __init uda134x_codec_init(void) module_platform_driver(uda134x_codec_driver);
{
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_DESCRIPTION("UDA134X ALSA soc codec driver"); MODULE_DESCRIPTION("UDA134X ALSA soc codec driver");
MODULE_AUTHOR("Zoltan Devai, Christian Pellegrin <chripell@evolware.org>"); MODULE_AUTHOR("Zoltan Devai, Christian Pellegrin <chripell@evolware.org>");
......
...@@ -510,17 +510,7 @@ static struct platform_driver wl1273_platform_driver = { ...@@ -510,17 +510,7 @@ static struct platform_driver wl1273_platform_driver = {
.remove = __devexit_p(wl1273_platform_remove), .remove = __devexit_p(wl1273_platform_remove),
}; };
static int __init wl1273_init(void) module_platform_driver(wl1273_platform_driver);
{
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_AUTHOR("Matti Aaltonen <matti.j.aaltonen@nokia.com>"); MODULE_AUTHOR("Matti Aaltonen <matti.j.aaltonen@nokia.com>");
MODULE_DESCRIPTION("ASoC WL1273 codec driver"); MODULE_DESCRIPTION("ASoC WL1273 codec driver");
......
...@@ -1711,17 +1711,7 @@ static struct platform_driver wm8350_codec_driver = { ...@@ -1711,17 +1711,7 @@ static struct platform_driver wm8350_codec_driver = {
.remove = __devexit_p(wm8350_remove), .remove = __devexit_p(wm8350_remove),
}; };
static __init int wm8350_init(void) module_platform_driver(wm8350_codec_driver);
{
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_DESCRIPTION("ASoC WM8350 driver"); MODULE_DESCRIPTION("ASoC WM8350 driver");
MODULE_AUTHOR("Liam Girdwood"); MODULE_AUTHOR("Liam Girdwood");
......
...@@ -1477,17 +1477,7 @@ static struct platform_driver wm8400_codec_driver = { ...@@ -1477,17 +1477,7 @@ static struct platform_driver wm8400_codec_driver = {
.remove = __devexit_p(wm8400_remove), .remove = __devexit_p(wm8400_remove),
}; };
static __init int wm8400_init(void) module_platform_driver(wm8400_codec_driver);
{
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_DESCRIPTION("ASoC WM8400 driver"); MODULE_DESCRIPTION("ASoC WM8400 driver");
MODULE_AUTHOR("Mark Brown"); MODULE_AUTHOR("Mark Brown");
......
...@@ -67,17 +67,7 @@ static struct platform_driver wm8727_codec_driver = { ...@@ -67,17 +67,7 @@ static struct platform_driver wm8727_codec_driver = {
.remove = __devexit_p(wm8727_remove), .remove = __devexit_p(wm8727_remove),
}; };
static int __init wm8727_init(void) module_platform_driver(wm8727_codec_driver);
{
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_DESCRIPTION("ASoC wm8727 driver"); MODULE_DESCRIPTION("ASoC wm8727 driver");
MODULE_AUTHOR("Neil Jones"); MODULE_AUTHOR("Neil Jones");
......
...@@ -63,17 +63,7 @@ static struct platform_driver wm8782_codec_driver = { ...@@ -63,17 +63,7 @@ static struct platform_driver wm8782_codec_driver = {
.remove = __devexit_p(wm8782_remove), .remove = __devexit_p(wm8782_remove),
}; };
static int __init wm8782_init(void) module_platform_driver(wm8782_codec_driver);
{
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_DESCRIPTION("ASoC WM8782 driver"); MODULE_DESCRIPTION("ASoC WM8782 driver");
MODULE_AUTHOR("Johannes Stezenbach <js@sig21.net>"); MODULE_AUTHOR("Johannes Stezenbach <js@sig21.net>");
......
...@@ -3579,18 +3579,7 @@ static struct platform_driver wm8994_codec_driver = { ...@@ -3579,18 +3579,7 @@ static struct platform_driver wm8994_codec_driver = {
.remove = __devexit_p(wm8994_remove), .remove = __devexit_p(wm8994_remove),
}; };
static __init int wm8994_init(void) module_platform_driver(wm8994_codec_driver);
{
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_DESCRIPTION("ASoC WM8994 driver"); MODULE_DESCRIPTION("ASoC WM8994 driver");
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
......
...@@ -406,17 +406,7 @@ static struct platform_driver wm9705_codec_driver = { ...@@ -406,17 +406,7 @@ static struct platform_driver wm9705_codec_driver = {
.remove = __devexit_p(wm9705_remove), .remove = __devexit_p(wm9705_remove),
}; };
static int __init wm9705_init(void) module_platform_driver(wm9705_codec_driver);
{
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_DESCRIPTION("ASoC WM9705 driver"); MODULE_DESCRIPTION("ASoC WM9705 driver");
MODULE_AUTHOR("Ian Molton"); MODULE_AUTHOR("Ian Molton");
......
...@@ -694,17 +694,7 @@ static struct platform_driver wm9712_codec_driver = { ...@@ -694,17 +694,7 @@ static struct platform_driver wm9712_codec_driver = {
.remove = __devexit_p(wm9712_remove), .remove = __devexit_p(wm9712_remove),
}; };
static int __init wm9712_init(void) module_platform_driver(wm9712_codec_driver);
{
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_DESCRIPTION("ASoC WM9711/WM9712 driver"); MODULE_DESCRIPTION("ASoC WM9711/WM9712 driver");
MODULE_AUTHOR("Liam Girdwood"); MODULE_AUTHOR("Liam Girdwood");
......
...@@ -1277,17 +1277,7 @@ static struct platform_driver wm9713_codec_driver = { ...@@ -1277,17 +1277,7 @@ static struct platform_driver wm9713_codec_driver = {
.remove = __devexit_p(wm9713_remove), .remove = __devexit_p(wm9713_remove),
}; };
static int __init wm9713_init(void) module_platform_driver(wm9713_codec_driver);
{
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_DESCRIPTION("ASoC WM9713/WM9714 driver"); MODULE_DESCRIPTION("ASoC WM9713/WM9714 driver");
MODULE_AUTHOR("Liam Girdwood"); MODULE_AUTHOR("Liam Girdwood");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册