diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-24 21:05:45 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-25 08:15:01 -0500 |
commit | b31c9056e400ddf10ec9691c6fada2fba1709330 (patch) | |
tree | 8fab1b1f3198fcc0acb41b0b7378146324fd6ee3 /sound/soc/atmel | |
parent | a81b82c09e70db853cb270ed9ac166b6c50d7b8c (diff) |
ASoC: Convert atmel directory to module_platform_driver
Factor out some boilerplate code.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/atmel')
-rw-r--r-- | sound/soc/atmel/atmel-pcm.c | 12 | ||||
-rw-r--r-- | sound/soc/atmel/atmel_ssc_dai.c | 12 |
2 files changed, 2 insertions, 22 deletions
diff --git a/sound/soc/atmel/atmel-pcm.c b/sound/soc/atmel/atmel-pcm.c index f81d4c3f8956..60de05525c06 100644 --- a/sound/soc/atmel/atmel-pcm.c +++ b/sound/soc/atmel/atmel-pcm.c | |||
@@ -495,17 +495,7 @@ static struct platform_driver atmel_pcm_driver = { | |||
495 | .remove = __devexit_p(atmel_soc_platform_remove), | 495 | .remove = __devexit_p(atmel_soc_platform_remove), |
496 | }; | 496 | }; |
497 | 497 | ||
498 | static int __init snd_atmel_pcm_init(void) | 498 | module_platform_driver(atmel_pcm_driver); |
499 | { | ||
500 | return platform_driver_register(&atmel_pcm_driver); | ||
501 | } | ||
502 | module_init(snd_atmel_pcm_init); | ||
503 | |||
504 | static void __exit snd_atmel_pcm_exit(void) | ||
505 | { | ||
506 | platform_driver_unregister(&atmel_pcm_driver); | ||
507 | } | ||
508 | module_exit(snd_atmel_pcm_exit); | ||
509 | 499 | ||
510 | MODULE_AUTHOR("Sedji Gaouaou <sedji.gaouaou@atmel.com>"); | 500 | MODULE_AUTHOR("Sedji Gaouaou <sedji.gaouaou@atmel.com>"); |
511 | MODULE_DESCRIPTION("Atmel PCM module"); | 501 | MODULE_DESCRIPTION("Atmel PCM module"); |
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index a67fc9b7dbe7..354341ec0f42 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c | |||
@@ -859,17 +859,7 @@ int atmel_ssc_set_audio(int ssc_id) | |||
859 | } | 859 | } |
860 | EXPORT_SYMBOL_GPL(atmel_ssc_set_audio); | 860 | EXPORT_SYMBOL_GPL(atmel_ssc_set_audio); |
861 | 861 | ||
862 | static int __init snd_atmel_ssc_init(void) | 862 | module_platform_driver(asoc_ssc_driver); |
863 | { | ||
864 | return platform_driver_register(&asoc_ssc_driver); | ||
865 | } | ||
866 | module_init(snd_atmel_ssc_init); | ||
867 | |||
868 | static void __exit snd_atmel_ssc_exit(void) | ||
869 | { | ||
870 | platform_driver_unregister(&asoc_ssc_driver); | ||
871 | } | ||
872 | module_exit(snd_atmel_ssc_exit); | ||
873 | 863 | ||
874 | /* Module information */ | 864 | /* Module information */ |
875 | MODULE_AUTHOR("Sedji Gaouaou, sedji.gaouaou@atmel.com, www.atmel.com"); | 865 | MODULE_AUTHOR("Sedji Gaouaou, sedji.gaouaou@atmel.com, www.atmel.com"); |