Commit cb5e8738 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

ASoC: Convert sh directory to module_platform_driver

Factor out some boilerplate code.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 2f702a19
...@@ -369,17 +369,7 @@ static struct platform_driver sh7760_pcm_driver = { ...@@ -369,17 +369,7 @@ static struct platform_driver sh7760_pcm_driver = {
.remove = __devexit_p(sh7760_soc_platform_remove), .remove = __devexit_p(sh7760_soc_platform_remove),
}; };
static int __init snd_sh7760_pcm_init(void) module_platform_driver(sh7760_pcm_driver);
{
return platform_driver_register(&sh7760_pcm_driver);
}
module_init(snd_sh7760_pcm_init);
static void __exit snd_sh7760_pcm_exit(void)
{
platform_driver_unregister(&sh7760_pcm_driver);
}
module_exit(snd_sh7760_pcm_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("SH7760 Audio DMA (DMABRG) driver"); MODULE_DESCRIPTION("SH7760 Audio DMA (DMABRG) driver");
......
...@@ -100,18 +100,7 @@ static struct platform_driver fsi_ak4642 = { ...@@ -100,18 +100,7 @@ static struct platform_driver fsi_ak4642 = {
.remove = fsi_ak4642_remove, .remove = fsi_ak4642_remove,
}; };
static int __init fsi_ak4642_init(void) module_platform_driver(fsi_ak4642);
{
return platform_driver_register(&fsi_ak4642);
}
static void __exit fsi_ak4642_exit(void)
{
platform_driver_unregister(&fsi_ak4642);
}
module_init(fsi_ak4642_init);
module_exit(fsi_ak4642_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Generic SH4 FSI-AK4642 sound card"); MODULE_DESCRIPTION("Generic SH4 FSI-AK4642 sound card");
......
...@@ -110,18 +110,7 @@ static struct platform_driver fsi_hdmi = { ...@@ -110,18 +110,7 @@ static struct platform_driver fsi_hdmi = {
.id_table = fsi_id_table, .id_table = fsi_id_table,
}; };
static int __init fsi_hdmi_init(void) module_platform_driver(fsi_hdmi);
{
return platform_driver_register(&fsi_hdmi);
}
static void __exit fsi_hdmi_exit(void)
{
platform_driver_unregister(&fsi_hdmi);
}
module_init(fsi_hdmi_init);
module_exit(fsi_hdmi_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Generic SH4 FSI-HDMI sound card"); MODULE_DESCRIPTION("Generic SH4 FSI-HDMI sound card");
......
...@@ -1468,18 +1468,7 @@ static struct platform_driver fsi_driver = { ...@@ -1468,18 +1468,7 @@ static struct platform_driver fsi_driver = {
.id_table = fsi_id_table, .id_table = fsi_id_table,
}; };
static int __init fsi_mobile_init(void) module_platform_driver(fsi_driver);
{
return platform_driver_register(&fsi_driver);
}
static void __exit fsi_mobile_exit(void)
{
platform_driver_unregister(&fsi_driver);
}
module_init(fsi_mobile_init);
module_exit(fsi_mobile_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("SuperH onchip FSI audio driver"); MODULE_DESCRIPTION("SuperH onchip FSI audio driver");
......
...@@ -332,17 +332,7 @@ static struct platform_driver hac_pcm_driver = { ...@@ -332,17 +332,7 @@ static struct platform_driver hac_pcm_driver = {
.remove = __devexit_p(hac_soc_platform_remove), .remove = __devexit_p(hac_soc_platform_remove),
}; };
static int __init sh4_hac_pcm_init(void) module_platform_driver(hac_pcm_driver);
{
return platform_driver_register(&hac_pcm_driver);
}
module_init(sh4_hac_pcm_init);
static void __exit sh4_hac_pcm_exit(void)
{
platform_driver_unregister(&hac_pcm_driver);
}
module_exit(sh4_hac_pcm_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("SuperH onchip HAC (AC97) audio driver"); MODULE_DESCRIPTION("SuperH onchip HAC (AC97) audio driver");
......
...@@ -852,18 +852,7 @@ static struct platform_driver siu_driver = { ...@@ -852,18 +852,7 @@ static struct platform_driver siu_driver = {
.remove = __devexit_p(siu_remove), .remove = __devexit_p(siu_remove),
}; };
static int __init siu_init(void) module_platform_driver(siu_driver);
{
return platform_driver_register(&siu_driver);
}
static void __exit siu_exit(void)
{
platform_driver_unregister(&siu_driver);
}
module_init(siu_init)
module_exit(siu_exit)
MODULE_AUTHOR("Carlos Munoz <carlos@kenati.com>"); MODULE_AUTHOR("Carlos Munoz <carlos@kenati.com>");
MODULE_DESCRIPTION("ALSA SoC SH7722 SIU driver"); MODULE_DESCRIPTION("ALSA SoC SH7722 SIU driver");
......
...@@ -401,17 +401,7 @@ static struct platform_driver sh4_ssi_driver = { ...@@ -401,17 +401,7 @@ static struct platform_driver sh4_ssi_driver = {
.remove = __devexit_p(sh4_soc_dai_remove), .remove = __devexit_p(sh4_soc_dai_remove),
}; };
static int __init snd_sh4_ssi_init(void) module_platform_driver(sh4_ssi_driver);
{
return platform_driver_register(&sh4_ssi_driver);
}
module_init(snd_sh4_ssi_init);
static void __exit snd_sh4_ssi_exit(void)
{
platform_driver_unregister(&sh4_ssi_driver);
}
module_exit(snd_sh4_ssi_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("SuperH onchip SSI (I2S) audio driver"); MODULE_DESCRIPTION("SuperH onchip SSI (I2S) audio driver");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment