aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-11-24 21:10:55 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-28 12:23:21 -0500
commitba0a7e024d2a0ccdb887cda149f3e11f1ce27101 (patch)
tree0098d694f54671fb33f4254e224dc6be13ef81d6 /sound/soc/fsl
parent6524c8e3e6525891d6085c7fb0f7fe5ce18e5b50 (diff)
ASoC: Convert fsl directory to module_platform_driver
Factor out some boilerplate code. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r--sound/soc/fsl/fsl_dma.c15
-rw-r--r--sound/soc/fsl/fsl_ssi.c15
-rw-r--r--sound/soc/fsl/mpc5200_dma.c12
-rw-r--r--sound/soc/fsl/mpc5200_psc_ac97.c16
-rw-r--r--sound/soc/fsl/mpc5200_psc_i2s.c16
5 files changed, 5 insertions, 69 deletions
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index ef15402a3bc4..4f59bbaba48f 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -992,20 +992,7 @@ static struct platform_driver fsl_soc_dma_driver = {
992 .remove = __devexit_p(fsl_soc_dma_remove), 992 .remove = __devexit_p(fsl_soc_dma_remove),
993}; 993};
994 994
995static int __init fsl_soc_dma_init(void) 995module_platform_driver(fsl_soc_dma_driver);
996{
997 pr_info("Freescale Elo DMA ASoC PCM Driver\n");
998
999 return platform_driver_register(&fsl_soc_dma_driver);
1000}
1001
1002static void __exit fsl_soc_dma_exit(void)
1003{
1004 platform_driver_unregister(&fsl_soc_dma_driver);
1005}
1006
1007module_init(fsl_soc_dma_init);
1008module_exit(fsl_soc_dma_exit);
1009 996
1010MODULE_AUTHOR("Timur Tabi <timur@freescale.com>"); 997MODULE_AUTHOR("Timur Tabi <timur@freescale.com>");
1011MODULE_DESCRIPTION("Freescale Elo DMA ASoC PCM Driver"); 998MODULE_DESCRIPTION("Freescale Elo DMA ASoC PCM Driver");
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 17d857e55efe..3e066966d878 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -793,20 +793,7 @@ static struct platform_driver fsl_ssi_driver = {
793 .remove = fsl_ssi_remove, 793 .remove = fsl_ssi_remove,
794}; 794};
795 795
796static int __init fsl_ssi_init(void) 796module_platform_driver(fsl_ssi_driver);
797{
798 printk(KERN_INFO "Freescale Synchronous Serial Interface (SSI) ASoC Driver\n");
799
800 return platform_driver_register(&fsl_ssi_driver);
801}
802
803static void __exit fsl_ssi_exit(void)
804{
805 platform_driver_unregister(&fsl_ssi_driver);
806}
807
808module_init(fsl_ssi_init);
809module_exit(fsl_ssi_exit);
810 797
811MODULE_AUTHOR("Timur Tabi <timur@freescale.com>"); 798MODULE_AUTHOR("Timur Tabi <timur@freescale.com>");
812MODULE_DESCRIPTION("Freescale Synchronous Serial Interface (SSI) ASoC Driver"); 799MODULE_DESCRIPTION("Freescale Synchronous Serial Interface (SSI) ASoC Driver");
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c
index 5c6c2457386e..e7803d34c425 100644
--- a/sound/soc/fsl/mpc5200_dma.c
+++ b/sound/soc/fsl/mpc5200_dma.c
@@ -526,17 +526,7 @@ static struct platform_driver mpc5200_hpcd_of_driver = {
526 } 526 }
527}; 527};
528 528
529static int __init mpc5200_hpcd_init(void) 529module_platform_driver(mpc5200_hpcd_of_driver);
530{
531 return platform_driver_register(&mpc5200_hpcd_of_driver);
532}
533module_init(mpc5200_hpcd_init);
534
535static void __exit mpc5200_hpcd_exit(void)
536{
537 platform_driver_unregister(&mpc5200_hpcd_of_driver);
538}
539module_exit(mpc5200_hpcd_exit);
540 530
541MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>"); 531MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>");
542MODULE_DESCRIPTION("Freescale MPC5200 PSC in DMA mode ASoC Driver"); 532MODULE_DESCRIPTION("Freescale MPC5200 PSC in DMA mode ASoC Driver");
diff --git a/sound/soc/fsl/mpc5200_psc_ac97.c b/sound/soc/fsl/mpc5200_psc_ac97.c
index 2fb388f0150b..ffa00a2eb770 100644
--- a/sound/soc/fsl/mpc5200_psc_ac97.c
+++ b/sound/soc/fsl/mpc5200_psc_ac97.c
@@ -325,21 +325,7 @@ static struct platform_driver psc_ac97_driver = {
325 }, 325 },
326}; 326};
327 327
328/* --------------------------------------------------------------------- 328module_platform_driver(psc_ac97_driver);
329 * Module setup and teardown; simply register the of_platform driver
330 * for the PSC in AC97 mode.
331 */
332static int __init psc_ac97_init(void)
333{
334 return platform_driver_register(&psc_ac97_driver);
335}
336module_init(psc_ac97_init);
337
338static void __exit psc_ac97_exit(void)
339{
340 platform_driver_unregister(&psc_ac97_driver);
341}
342module_exit(psc_ac97_exit);
343 329
344MODULE_AUTHOR("Jon Smirl <jonsmirl@gmail.com>"); 330MODULE_AUTHOR("Jon Smirl <jonsmirl@gmail.com>");
345MODULE_DESCRIPTION("mpc5200 AC97 module"); 331MODULE_DESCRIPTION("mpc5200 AC97 module");
diff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c
index e77a1f20d4d2..7b530327553a 100644
--- a/sound/soc/fsl/mpc5200_psc_i2s.c
+++ b/sound/soc/fsl/mpc5200_psc_i2s.c
@@ -222,21 +222,7 @@ static struct platform_driver psc_i2s_driver = {
222 }, 222 },
223}; 223};
224 224
225/* --------------------------------------------------------------------- 225module_platform_driver(psc_i2s_driver);
226 * Module setup and teardown; simply register the of_platform driver
227 * for the PSC in I2S mode.
228 */
229static int __init psc_i2s_init(void)
230{
231 return platform_driver_register(&psc_i2s_driver);
232}
233module_init(psc_i2s_init);
234
235static void __exit psc_i2s_exit(void)
236{
237 platform_driver_unregister(&psc_i2s_driver);
238}
239module_exit(psc_i2s_exit);
240 226
241MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>"); 227MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>");
242MODULE_DESCRIPTION("Freescale MPC5200 PSC in I2S mode ASoC Driver"); 228MODULE_DESCRIPTION("Freescale MPC5200 PSC in I2S mode ASoC Driver");