From: Axel Lin Date: Thu, 24 Nov 2011 03:51:56 +0000 (+0800) Subject: ASoC: Convert mid-x86 directory to module_platform_driver X-Git-Tag: MMI-PSA29.97-13-9~16612^2~403 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=29515d62db425796d82e2e2d9209a44b9e324ff4;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ASoC: Convert mid-x86 directory to module_platform_driver Factor out some boilerplate code. Signed-off-by: Axel Lin Acked-by: Vinod Koul Signed-off-by: Mark Brown --- 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 = { .remove = __devexit_p(snd_mfld_mc_remove), }; -static int __init snd_mfld_driver_init(void) -{ - pr_debug("snd_mfld_driver_init called\n"); - return platform_driver_register(&snd_mfld_mc_driver); -} -module_init(snd_mfld_driver_init); - -static void __exit snd_mfld_driver_exit(void) -{ - pr_debug("snd_mfld_driver_exit called\n"); - platform_driver_unregister(&snd_mfld_mc_driver); -} -module_exit(snd_mfld_driver_exit); +module_platform_driver(snd_mfld_mc_driver); MODULE_DESCRIPTION("ASoC Intel(R) MID Machine driver"); MODULE_AUTHOR("Vinod Koul "); 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 = { .remove = sst_platform_remove, }; -static int __init sst_soc_platform_init(void) -{ - pr_debug("sst_soc_platform_init called\n"); - return platform_driver_register(&sst_platform_driver); -} -module_init(sst_soc_platform_init); - -static void __exit sst_soc_platform_exit(void) -{ - platform_driver_unregister(&sst_platform_driver); - pr_debug("sst_soc_platform_exit success\n"); -} -module_exit(sst_soc_platform_exit); +module_platform_driver(sst_platform_driver); MODULE_DESCRIPTION("ASoC Intel(R) MID Platform driver"); MODULE_AUTHOR("Vinod Koul ");