From: Axel Lin Date: Thu, 24 Nov 2011 04:14:56 +0000 (+0800) Subject: ASoC: Convert s6000 directory to module_platform_driver X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=880dd7210cd04205c6584922ad16b2d5731ab2c0;p=linux-beck.git ASoC: Convert s6000 directory to module_platform_driver Factor out some boilerplate code. Signed-off-by: Axel Lin Acked-by: Daniel Glöckner Signed-off-by: Mark Brown --- diff --git a/sound/soc/s6000/s6000-i2s.c b/sound/soc/s6000/s6000-i2s.c index 13716a9317fb..aaabdbaec19c 100644 --- a/sound/soc/s6000/s6000-i2s.c +++ b/sound/soc/s6000/s6000-i2s.c @@ -604,17 +604,7 @@ static struct platform_driver s6000_i2s_driver = { }, }; -static int __init s6000_i2s_init(void) -{ - return platform_driver_register(&s6000_i2s_driver); -} -module_init(s6000_i2s_init); - -static void __exit s6000_i2s_exit(void) -{ - platform_driver_unregister(&s6000_i2s_driver); -} -module_exit(s6000_i2s_exit); +module_platform_driver(s6000_i2s_driver); MODULE_AUTHOR("Daniel Gloeckner"); MODULE_DESCRIPTION("Stretch s6000 family I2S SoC Interface"); diff --git a/sound/soc/s6000/s6000-pcm.c b/sound/soc/s6000/s6000-pcm.c index 55efc2bdf0bd..43c014f362f6 100644 --- a/sound/soc/s6000/s6000-pcm.c +++ b/sound/soc/s6000/s6000-pcm.c @@ -520,17 +520,7 @@ static struct platform_driver s6000_pcm_driver = { .remove = __devexit_p(s6000_soc_platform_remove), }; -static int __init snd_s6000_pcm_init(void) -{ - return platform_driver_register(&s6000_pcm_driver); -} -module_init(snd_s6000_pcm_init); - -static void __exit snd_s6000_pcm_exit(void) -{ - platform_driver_unregister(&s6000_pcm_driver); -} -module_exit(snd_s6000_pcm_exit); +module_platform_driver(s6000_pcm_driver); MODULE_AUTHOR("Daniel Gloeckner"); MODULE_DESCRIPTION("Stretch s6000 family PCM DMA module");