From: Axel Lin Date: Thu, 24 Nov 2011 03:43:09 +0000 (+0800) Subject: ASoC: Convert kirkwood directory to module_platform_driver X-Git-Tag: MMI-PSA29.97-13-9~16612^2~404 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=41b1022509733bb3347b15d670f3c1609ddf928f;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ASoC: Convert kirkwood directory to module_platform_driver Factor out some boilerplate code. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- diff --git a/sound/soc/kirkwood/kirkwood-dma.c b/sound/soc/kirkwood/kirkwood-dma.c index cd33de1c5b7a..210438261a49 100644 --- a/sound/soc/kirkwood/kirkwood-dma.c +++ b/sound/soc/kirkwood/kirkwood-dma.c @@ -388,17 +388,7 @@ static struct platform_driver kirkwood_pcm_driver = { .remove = __devexit_p(kirkwood_soc_platform_remove), }; -static int __init kirkwood_pcm_init(void) -{ - return platform_driver_register(&kirkwood_pcm_driver); -} -module_init(kirkwood_pcm_init); - -static void __exit kirkwood_pcm_exit(void) -{ - platform_driver_unregister(&kirkwood_pcm_driver); -} -module_exit(kirkwood_pcm_exit); +module_platform_driver(kirkwood_pcm_driver); MODULE_AUTHOR("Arnaud Patard "); MODULE_DESCRIPTION("Marvell Kirkwood Audio DMA module"); diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index 2b212dcb9ac7..f6bb21156876 100644 --- a/sound/soc/kirkwood/kirkwood-i2s.c +++ b/sound/soc/kirkwood/kirkwood-i2s.c @@ -483,17 +483,7 @@ static struct platform_driver kirkwood_i2s_driver = { }, }; -static int __init kirkwood_i2s_init(void) -{ - return platform_driver_register(&kirkwood_i2s_driver); -} -module_init(kirkwood_i2s_init); - -static void __exit kirkwood_i2s_exit(void) -{ - platform_driver_unregister(&kirkwood_i2s_driver); -} -module_exit(kirkwood_i2s_exit); +module_platform_driver(kirkwood_i2s_driver); /* Module information */ MODULE_AUTHOR("Arnaud Patard, ");