ASoC: Convert sh directory to module_platform_driver
authorAxel Lin <axel.lin@gmail.com>
Fri, 25 Nov 2011 02:15:07 +0000 (10:15 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 25 Nov 2011 13:15:29 +0000 (13:15 +0000)
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/sh/dma-sh7760.c
sound/soc/sh/fsi-ak4642.c
sound/soc/sh/fsi-hdmi.c
sound/soc/sh/fsi.c
sound/soc/sh/hac.c
sound/soc/sh/siu_dai.c
sound/soc/sh/ssi.c

index db74005f37ce78b69d7dffd873d4bc82775e8a64..7da20186b19e63bdf7efe6372a33b41190e82a2f 100644 (file)
@@ -369,17 +369,7 @@ static struct platform_driver sh7760_pcm_driver = {
        .remove = __devexit_p(sh7760_soc_platform_remove),
 };
 
-static int __init snd_sh7760_pcm_init(void)
-{
-       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_platform_driver(sh7760_pcm_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("SH7760 Audio DMA (DMABRG) driver");
index 11d2d7ff29d94d7fede5be68e60c0e89d9730d40..eb52778d0f90c81bfd81cdf0c6edd7a5151215be 100644 (file)
@@ -100,18 +100,7 @@ static struct platform_driver fsi_ak4642 = {
        .remove         = fsi_ak4642_remove,
 };
 
-static int __init fsi_ak4642_init(void)
-{
-       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_platform_driver(fsi_ak4642);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Generic SH4 FSI-AK4642 sound card");
index 3ebebe706ad3bf732114cfd06ede04cf412b183d..621aea155ac1a27a7ad9f62478c5fbfee205215b 100644 (file)
@@ -110,18 +110,7 @@ static struct platform_driver fsi_hdmi = {
        .id_table       = fsi_id_table,
 };
 
-static int __init fsi_hdmi_init(void)
-{
-       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_platform_driver(fsi_hdmi);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Generic SH4 FSI-HDMI sound card");
index aa3033075a0d4817d3fcd07e92a0665d88212e08..a27c30636b824d5d9289e4a4367fe4cf1e23f556 100644 (file)
@@ -1468,18 +1468,7 @@ static struct platform_driver fsi_driver = {
        .id_table       = fsi_id_table,
 };
 
-static int __init fsi_mobile_init(void)
-{
-       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_platform_driver(fsi_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("SuperH onchip FSI audio driver");
index a1f307b9a82d02b8b27e4c5b3d73676a62b4b775..3474d7befe5ae537fc6e9862050f5e81dcce9daa 100644 (file)
@@ -332,17 +332,7 @@ static struct platform_driver hac_pcm_driver = {
        .remove = __devexit_p(hac_soc_platform_remove),
 };
 
-static int __init sh4_hac_pcm_init(void)
-{
-       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_platform_driver(hac_pcm_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("SuperH onchip HAC (AC97) audio driver");
index 93dea49ff1a7afba809e166eecfd2b93fee4b604..11c608570820734f30eafd31d2bba8525f6a7e38 100644 (file)
@@ -852,18 +852,7 @@ static struct platform_driver siu_driver = {
        .remove         = __devexit_p(siu_remove),
 };
 
-static int __init siu_init(void)
-{
-       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_platform_driver(siu_driver);
 
 MODULE_AUTHOR("Carlos Munoz <carlos@kenati.com>");
 MODULE_DESCRIPTION("ALSA SoC SH7722 SIU driver");
index 1fda16a00e6ae5b5ca9acd87e60b5eee7a280cc1..ff82b56a886093e43c5456b14592452478d5d4a2 100644 (file)
@@ -401,17 +401,7 @@ static struct platform_driver sh4_ssi_driver = {
        .remove = __devexit_p(sh4_soc_dai_remove),
 };
 
-static int __init snd_sh4_ssi_init(void)
-{
-       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_platform_driver(sh4_ssi_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("SuperH onchip SSI (I2S) audio driver");