From 5bbcc3c0d0f063318ec83146d1958acf7154c66f Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Wed, 23 Nov 2011 22:52:08 +0000 Subject: ASoC: Convert CODEC drivers to module_platform_driver Factors out a bit of boilerplate. Signed-off-by: Mark Brown --- sound/soc/codecs/wm8782.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'sound/soc/codecs/wm8782.c') diff --git a/sound/soc/codecs/wm8782.c b/sound/soc/codecs/wm8782.c index f2ced71..3fdea98 100644 --- a/sound/soc/codecs/wm8782.c +++ b/sound/soc/codecs/wm8782.c @@ -63,17 +63,7 @@ static struct platform_driver wm8782_codec_driver = { .remove = __devexit_p(wm8782_remove), }; -static int __init wm8782_init(void) -{ - return platform_driver_register(&wm8782_codec_driver); -} -module_init(wm8782_init); - -static void __exit wm8782_exit(void) -{ - platform_driver_unregister(&wm8782_codec_driver); -} -module_exit(wm8782_exit); +module_platform_driver(wm8782_codec_driver); MODULE_DESCRIPTION("ASoC WM8782 driver"); MODULE_AUTHOR("Johannes Stezenbach "); -- cgit v1.1