ASoC: Convert mid-x86 directory to module_platform_driver
authorAxel Lin <axel.lin@gmail.com>
Thu, 24 Nov 2011 03:51:56 +0000 (11:51 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 24 Nov 2011 10:45:21 +0000 (10:45 +0000)
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>
sound/soc/mid-x86/mfld_machine.c
sound/soc/mid-x86/sst_platform.c

index cca693ae1bd444e5b12d7617f56a160453dafd9e..e53f8e473a78be51d13cff82f0cf17a7f5b24da3 100644 (file)
@@ -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 <vinod.koul@intel.com>");
index 23057020aa0fb01abff851ae0fa4e3f75d9cf30c..94f70b3f94e655254b82caf123075e43e5895ae7 100644 (file)
@@ -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 <vinod.koul@intel.com>");