diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-23 22:51:56 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-24 05:45:21 -0500 |
commit | 29515d62db425796d82e2e2d9209a44b9e324ff4 (patch) | |
tree | 70e6f1363b1d80ca9822a9dd220953b34eaec76b | |
parent | 41b1022509733bb3347b15d670f3c1609ddf928f (diff) |
ASoC: Convert mid-x86 directory to module_platform_driver
Factor out some boilerplate code.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | sound/soc/mid-x86/mfld_machine.c | 14 | ||||
-rw-r--r-- | sound/soc/mid-x86/sst_platform.c | 14 |
2 files changed, 2 insertions, 26 deletions
diff --git a/sound/soc/mid-x86/mfld_machine.c b/sound/soc/mid-x86/mfld_machine.c index cca693ae1bd4..e53f8e473a78 100644 --- a/sound/soc/mid-x86/mfld_machine.c +++ b/sound/soc/mid-x86/mfld_machine.c | |||
@@ -428,19 +428,7 @@ static struct platform_driver snd_mfld_mc_driver = { | |||
428 | .remove = __devexit_p(snd_mfld_mc_remove), | 428 | .remove = __devexit_p(snd_mfld_mc_remove), |
429 | }; | 429 | }; |
430 | 430 | ||
431 | static int __init snd_mfld_driver_init(void) | 431 | module_platform_driver(snd_mfld_mc_driver); |
432 | { | ||
433 | pr_debug("snd_mfld_driver_init called\n"); | ||
434 | return platform_driver_register(&snd_mfld_mc_driver); | ||
435 | } | ||
436 | module_init(snd_mfld_driver_init); | ||
437 | |||
438 | static void __exit snd_mfld_driver_exit(void) | ||
439 | { | ||
440 | pr_debug("snd_mfld_driver_exit called\n"); | ||
441 | platform_driver_unregister(&snd_mfld_mc_driver); | ||
442 | } | ||
443 | module_exit(snd_mfld_driver_exit); | ||
444 | 432 | ||
445 | MODULE_DESCRIPTION("ASoC Intel(R) MID Machine driver"); | 433 | MODULE_DESCRIPTION("ASoC Intel(R) MID Machine driver"); |
446 | MODULE_AUTHOR("Vinod Koul <vinod.koul@intel.com>"); | 434 | MODULE_AUTHOR("Vinod Koul <vinod.koul@intel.com>"); |
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c index 23057020aa0f..94f70b3f94e6 100644 --- a/sound/soc/mid-x86/sst_platform.c +++ b/sound/soc/mid-x86/sst_platform.c | |||
@@ -472,19 +472,7 @@ static struct platform_driver sst_platform_driver = { | |||
472 | .remove = sst_platform_remove, | 472 | .remove = sst_platform_remove, |
473 | }; | 473 | }; |
474 | 474 | ||
475 | static int __init sst_soc_platform_init(void) | 475 | module_platform_driver(sst_platform_driver); |
476 | { | ||
477 | pr_debug("sst_soc_platform_init called\n"); | ||
478 | return platform_driver_register(&sst_platform_driver); | ||
479 | } | ||
480 | module_init(sst_soc_platform_init); | ||
481 | |||
482 | static void __exit sst_soc_platform_exit(void) | ||
483 | { | ||
484 | platform_driver_unregister(&sst_platform_driver); | ||
485 | pr_debug("sst_soc_platform_exit success\n"); | ||
486 | } | ||
487 | module_exit(sst_soc_platform_exit); | ||
488 | 476 | ||
489 | MODULE_DESCRIPTION("ASoC Intel(R) MID Platform driver"); | 477 | MODULE_DESCRIPTION("ASoC Intel(R) MID Platform driver"); |
490 | MODULE_AUTHOR("Vinod Koul <vinod.koul@intel.com>"); | 478 | MODULE_AUTHOR("Vinod Koul <vinod.koul@intel.com>"); |