ASoC: Convert smdk_wm8994pcm to use module_platform_driver()
authorAxel Lin <axel.lin@gmail.com>
Mon, 28 Nov 2011 10:53:57 +0000 (18:53 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 29 Nov 2011 11:34:05 +0000 (11:34 +0000)
Use the module_platform_driver() macro which makes
the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/samsung/smdk_wm8994pcm.c

index da9c2a264d939d47c3ab4f6f5f65b406f7423d69..23c7fb71ddfa25f4559db84971d544fca1b9b2eb 100644 (file)
@@ -158,19 +158,7 @@ static struct platform_driver snd_smdk_driver = {
        .remove = __devexit_p(snd_smdk_remove),
 };
 
-static int __init smdk_audio_init(void)
-{
-       return platform_driver_register(&snd_smdk_driver);
-}
-
-module_init(smdk_audio_init);
-
-static void __exit smdk_audio_exit(void)
-{
-       platform_driver_unregister(&snd_smdk_driver);
-}
-
-module_exit(smdk_audio_exit);
+module_platform_driver(snd_smdk_driver);
 
 MODULE_AUTHOR("Sangbeom Kim, <sbkim73@samsung.com>");
 MODULE_DESCRIPTION("ALSA SoC SMDK WM8994 for PCM");