diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-23 22:43:09 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-24 05:45:20 -0500 |
commit | 41b1022509733bb3347b15d670f3c1609ddf928f (patch) | |
tree | 696152762f49fd592846f12fd0302405f1b92799 /sound/soc/kirkwood | |
parent | d0efa6a279e53df0f695382a5a6958e8a9863bff (diff) |
ASoC: Convert kirkwood 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/kirkwood')
-rw-r--r-- | sound/soc/kirkwood/kirkwood-dma.c | 12 | ||||
-rw-r--r-- | sound/soc/kirkwood/kirkwood-i2s.c | 12 |
2 files changed, 2 insertions, 22 deletions
diff --git a/sound/soc/kirkwood/kirkwood-dma.c b/sound/soc/kirkwood/kirkwood-dma.c index cd33de1c5b7a..210438261a49 100644 --- a/sound/soc/kirkwood/kirkwood-dma.c +++ b/sound/soc/kirkwood/kirkwood-dma.c | |||
@@ -388,17 +388,7 @@ static struct platform_driver kirkwood_pcm_driver = { | |||
388 | .remove = __devexit_p(kirkwood_soc_platform_remove), | 388 | .remove = __devexit_p(kirkwood_soc_platform_remove), |
389 | }; | 389 | }; |
390 | 390 | ||
391 | static int __init kirkwood_pcm_init(void) | 391 | module_platform_driver(kirkwood_pcm_driver); |
392 | { | ||
393 | return platform_driver_register(&kirkwood_pcm_driver); | ||
394 | } | ||
395 | module_init(kirkwood_pcm_init); | ||
396 | |||
397 | static void __exit kirkwood_pcm_exit(void) | ||
398 | { | ||
399 | platform_driver_unregister(&kirkwood_pcm_driver); | ||
400 | } | ||
401 | module_exit(kirkwood_pcm_exit); | ||
402 | 392 | ||
403 | MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>"); | 393 | MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>"); |
404 | MODULE_DESCRIPTION("Marvell Kirkwood Audio DMA module"); | 394 | MODULE_DESCRIPTION("Marvell Kirkwood Audio DMA module"); |
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index 2b212dcb9ac7..f6bb21156876 100644 --- a/sound/soc/kirkwood/kirkwood-i2s.c +++ b/sound/soc/kirkwood/kirkwood-i2s.c | |||
@@ -483,17 +483,7 @@ static struct platform_driver kirkwood_i2s_driver = { | |||
483 | }, | 483 | }, |
484 | }; | 484 | }; |
485 | 485 | ||
486 | static int __init kirkwood_i2s_init(void) | 486 | module_platform_driver(kirkwood_i2s_driver); |
487 | { | ||
488 | return platform_driver_register(&kirkwood_i2s_driver); | ||
489 | } | ||
490 | module_init(kirkwood_i2s_init); | ||
491 | |||
492 | static void __exit kirkwood_i2s_exit(void) | ||
493 | { | ||
494 | platform_driver_unregister(&kirkwood_i2s_driver); | ||
495 | } | ||
496 | module_exit(kirkwood_i2s_exit); | ||
497 | 487 | ||
498 | /* Module information */ | 488 | /* Module information */ |
499 | MODULE_AUTHOR("Arnaud Patard, <arnaud.patard@rtp-net.org>"); | 489 | MODULE_AUTHOR("Arnaud Patard, <arnaud.patard@rtp-net.org>"); |