diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-24 21:16:10 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-25 08:15:30 -0500 |
commit | 33d316cd8b39fda7106332e5554f5959dc04b4dc (patch) | |
tree | a27a6cf7e98ee8f2d0ae3493a7d2da00664e708f /sound/soc/txx9 | |
parent | cb5e87387cfa8172faca36682e2df069b006efdf (diff) |
ASoC: Convert txx9 directory to module_platform_driver
Factor out some boilerplate code.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/txx9')
-rw-r--r-- | sound/soc/txx9/txx9aclc-ac97.c | 13 | ||||
-rw-r--r-- | sound/soc/txx9/txx9aclc.c | 12 |
2 files changed, 2 insertions, 23 deletions
diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c index a4e3f5501847..28db4ca997ca 100644 --- a/sound/soc/txx9/txx9aclc-ac97.c +++ b/sound/soc/txx9/txx9aclc-ac97.c | |||
@@ -223,18 +223,7 @@ static struct platform_driver txx9aclc_ac97_driver = { | |||
223 | }, | 223 | }, |
224 | }; | 224 | }; |
225 | 225 | ||
226 | static int __init txx9aclc_ac97_init(void) | 226 | module_platform_driver(txx9aclc_ac97_driver); |
227 | { | ||
228 | return platform_driver_register(&txx9aclc_ac97_driver); | ||
229 | } | ||
230 | |||
231 | static void __exit txx9aclc_ac97_exit(void) | ||
232 | { | ||
233 | platform_driver_unregister(&txx9aclc_ac97_driver); | ||
234 | } | ||
235 | |||
236 | module_init(txx9aclc_ac97_init); | ||
237 | module_exit(txx9aclc_ac97_exit); | ||
238 | 227 | ||
239 | MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>"); | 228 | MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>"); |
240 | MODULE_DESCRIPTION("TXx9 ACLC AC97 driver"); | 229 | MODULE_DESCRIPTION("TXx9 ACLC AC97 driver"); |
diff --git a/sound/soc/txx9/txx9aclc.c b/sound/soc/txx9/txx9aclc.c index 3de99af8cb82..93931def0dce 100644 --- a/sound/soc/txx9/txx9aclc.c +++ b/sound/soc/txx9/txx9aclc.c | |||
@@ -438,17 +438,7 @@ static struct platform_driver txx9aclc_pcm_driver = { | |||
438 | .remove = __devexit_p(txx9aclc_soc_platform_remove), | 438 | .remove = __devexit_p(txx9aclc_soc_platform_remove), |
439 | }; | 439 | }; |
440 | 440 | ||
441 | static int __init snd_txx9aclc_pcm_init(void) | 441 | module_platform_driver(txx9aclc_pcm_driver); |
442 | { | ||
443 | return platform_driver_register(&txx9aclc_pcm_driver); | ||
444 | } | ||
445 | module_init(snd_txx9aclc_pcm_init); | ||
446 | |||
447 | static void __exit snd_txx9aclc_pcm_exit(void) | ||
448 | { | ||
449 | platform_driver_unregister(&txx9aclc_pcm_driver); | ||
450 | } | ||
451 | module_exit(snd_txx9aclc_pcm_exit); | ||
452 | 442 | ||
453 | MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>"); | 443 | MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>"); |
454 | MODULE_DESCRIPTION("TXx9 ACLC Audio DMA driver"); | 444 | MODULE_DESCRIPTION("TXx9 ACLC Audio DMA driver"); |