diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-23 21:13:03 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-24 05:45:19 -0500 |
commit | c32986e66bd72c02f9ecef490769248c7fcb5145 (patch) | |
tree | 118a82cbbebae72132b3d658640a9b24abbf0852 /sound/soc/jz4740 | |
parent | 7a24b2ba59fda5e6d1367d5d3cb0d4d0f811713b (diff) |
ASoC: Convert jz4740 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/jz4740')
-rw-r--r-- | sound/soc/jz4740/jz4740-i2s.c | 12 | ||||
-rw-r--r-- | sound/soc/jz4740/jz4740-pcm.c | 12 |
2 files changed, 2 insertions, 22 deletions
diff --git a/sound/soc/jz4740/jz4740-i2s.c b/sound/soc/jz4740/jz4740-i2s.c index 91255c6e1ee7..a5af7c42e62b 100644 --- a/sound/soc/jz4740/jz4740-i2s.c +++ b/sound/soc/jz4740/jz4740-i2s.c | |||
@@ -519,17 +519,7 @@ static struct platform_driver jz4740_i2s_driver = { | |||
519 | }, | 519 | }, |
520 | }; | 520 | }; |
521 | 521 | ||
522 | static int __init jz4740_i2s_init(void) | 522 | module_platform_driver(jz4740_i2s_driver); |
523 | { | ||
524 | return platform_driver_register(&jz4740_i2s_driver); | ||
525 | } | ||
526 | module_init(jz4740_i2s_init); | ||
527 | |||
528 | static void __exit jz4740_i2s_exit(void) | ||
529 | { | ||
530 | platform_driver_unregister(&jz4740_i2s_driver); | ||
531 | } | ||
532 | module_exit(jz4740_i2s_exit); | ||
533 | 523 | ||
534 | MODULE_AUTHOR("Lars-Peter Clausen, <lars@metafoo.de>"); | 524 | MODULE_AUTHOR("Lars-Peter Clausen, <lars@metafoo.de>"); |
535 | MODULE_DESCRIPTION("Ingenic JZ4740 SoC I2S driver"); | 525 | MODULE_DESCRIPTION("Ingenic JZ4740 SoC I2S driver"); |
diff --git a/sound/soc/jz4740/jz4740-pcm.c b/sound/soc/jz4740/jz4740-pcm.c index d1989cde9f14..50cda9ea9156 100644 --- a/sound/soc/jz4740/jz4740-pcm.c +++ b/sound/soc/jz4740/jz4740-pcm.c | |||
@@ -356,17 +356,7 @@ static struct platform_driver jz4740_pcm_driver = { | |||
356 | }, | 356 | }, |
357 | }; | 357 | }; |
358 | 358 | ||
359 | static int __init jz4740_soc_platform_init(void) | 359 | module_platform_driver(jz4740_pcm_driver); |
360 | { | ||
361 | return platform_driver_register(&jz4740_pcm_driver); | ||
362 | } | ||
363 | module_init(jz4740_soc_platform_init); | ||
364 | |||
365 | static void __exit jz4740_soc_platform_exit(void) | ||
366 | { | ||
367 | return platform_driver_unregister(&jz4740_pcm_driver); | ||
368 | } | ||
369 | module_exit(jz4740_soc_platform_exit); | ||
370 | 360 | ||
371 | MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); | 361 | MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); |
372 | MODULE_DESCRIPTION("Ingenic SoC JZ4740 PCM driver"); | 362 | MODULE_DESCRIPTION("Ingenic SoC JZ4740 PCM driver"); |