diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-24 21:10:55 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-28 12:23:21 -0500 |
commit | ba0a7e024d2a0ccdb887cda149f3e11f1ce27101 (patch) | |
tree | 0098d694f54671fb33f4254e224dc6be13ef81d6 /sound/soc/fsl | |
parent | 6524c8e3e6525891d6085c7fb0f7fe5ce18e5b50 (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.c | 15 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_ssi.c | 15 | ||||
-rw-r--r-- | sound/soc/fsl/mpc5200_dma.c | 12 | ||||
-rw-r--r-- | sound/soc/fsl/mpc5200_psc_ac97.c | 16 | ||||
-rw-r--r-- | sound/soc/fsl/mpc5200_psc_i2s.c | 16 |
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 | ||
995 | static int __init fsl_soc_dma_init(void) | 995 | module_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 | |||
1002 | static void __exit fsl_soc_dma_exit(void) | ||
1003 | { | ||
1004 | platform_driver_unregister(&fsl_soc_dma_driver); | ||
1005 | } | ||
1006 | |||
1007 | module_init(fsl_soc_dma_init); | ||
1008 | module_exit(fsl_soc_dma_exit); | ||
1009 | 996 | ||
1010 | MODULE_AUTHOR("Timur Tabi <timur@freescale.com>"); | 997 | MODULE_AUTHOR("Timur Tabi <timur@freescale.com>"); |
1011 | MODULE_DESCRIPTION("Freescale Elo DMA ASoC PCM Driver"); | 998 | MODULE_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 | ||
796 | static int __init fsl_ssi_init(void) | 796 | module_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 | |||
803 | static void __exit fsl_ssi_exit(void) | ||
804 | { | ||
805 | platform_driver_unregister(&fsl_ssi_driver); | ||
806 | } | ||
807 | |||
808 | module_init(fsl_ssi_init); | ||
809 | module_exit(fsl_ssi_exit); | ||
810 | 797 | ||
811 | MODULE_AUTHOR("Timur Tabi <timur@freescale.com>"); | 798 | MODULE_AUTHOR("Timur Tabi <timur@freescale.com>"); |
812 | MODULE_DESCRIPTION("Freescale Synchronous Serial Interface (SSI) ASoC Driver"); | 799 | MODULE_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 | ||
529 | static int __init mpc5200_hpcd_init(void) | 529 | module_platform_driver(mpc5200_hpcd_of_driver); |
530 | { | ||
531 | return platform_driver_register(&mpc5200_hpcd_of_driver); | ||
532 | } | ||
533 | module_init(mpc5200_hpcd_init); | ||
534 | |||
535 | static void __exit mpc5200_hpcd_exit(void) | ||
536 | { | ||
537 | platform_driver_unregister(&mpc5200_hpcd_of_driver); | ||
538 | } | ||
539 | module_exit(mpc5200_hpcd_exit); | ||
540 | 530 | ||
541 | MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>"); | 531 | MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>"); |
542 | MODULE_DESCRIPTION("Freescale MPC5200 PSC in DMA mode ASoC Driver"); | 532 | MODULE_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 | /* --------------------------------------------------------------------- | 328 | module_platform_driver(psc_ac97_driver); |
329 | * Module setup and teardown; simply register the of_platform driver | ||
330 | * for the PSC in AC97 mode. | ||
331 | */ | ||
332 | static int __init psc_ac97_init(void) | ||
333 | { | ||
334 | return platform_driver_register(&psc_ac97_driver); | ||
335 | } | ||
336 | module_init(psc_ac97_init); | ||
337 | |||
338 | static void __exit psc_ac97_exit(void) | ||
339 | { | ||
340 | platform_driver_unregister(&psc_ac97_driver); | ||
341 | } | ||
342 | module_exit(psc_ac97_exit); | ||
343 | 329 | ||
344 | MODULE_AUTHOR("Jon Smirl <jonsmirl@gmail.com>"); | 330 | MODULE_AUTHOR("Jon Smirl <jonsmirl@gmail.com>"); |
345 | MODULE_DESCRIPTION("mpc5200 AC97 module"); | 331 | MODULE_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 | /* --------------------------------------------------------------------- | 225 | module_platform_driver(psc_i2s_driver); |
226 | * Module setup and teardown; simply register the of_platform driver | ||
227 | * for the PSC in I2S mode. | ||
228 | */ | ||
229 | static int __init psc_i2s_init(void) | ||
230 | { | ||
231 | return platform_driver_register(&psc_i2s_driver); | ||
232 | } | ||
233 | module_init(psc_i2s_init); | ||
234 | |||
235 | static void __exit psc_i2s_exit(void) | ||
236 | { | ||
237 | platform_driver_unregister(&psc_i2s_driver); | ||
238 | } | ||
239 | module_exit(psc_i2s_exit); | ||
240 | 226 | ||
241 | MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>"); | 227 | MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>"); |
242 | MODULE_DESCRIPTION("Freescale MPC5200 PSC in I2S mode ASoC Driver"); | 228 | MODULE_DESCRIPTION("Freescale MPC5200 PSC in I2S mode ASoC Driver"); |