From 51451b8d607374297055c4e08034b39f4be22d33 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 24 Nov 2011 18:47:25 +0800 Subject: ALSA: Convert mips directory to module_platform_driver Factor out some boilerplate code. Signed-off-by: Axel Lin Signed-off-by: Takashi Iwai --- sound/mips/hal2.c | 13 +------------ sound/mips/sgio2audio.c | 13 +------------ 2 files changed, 2 insertions(+), 24 deletions(-) (limited to 'sound/mips') diff --git a/sound/mips/hal2.c b/sound/mips/hal2.c index 2e6c85894e0b..5f88d1f09ffe 100644 --- a/sound/mips/hal2.c +++ b/sound/mips/hal2.c @@ -935,15 +935,4 @@ static struct platform_driver hal2_driver = { } }; -static int __init alsa_card_hal2_init(void) -{ - return platform_driver_register(&hal2_driver); -} - -static void __exit alsa_card_hal2_exit(void) -{ - platform_driver_unregister(&hal2_driver); -} - -module_init(alsa_card_hal2_init); -module_exit(alsa_card_hal2_exit); +module_platform_driver(hal2_driver); diff --git a/sound/mips/sgio2audio.c b/sound/mips/sgio2audio.c index 69425d4c91fd..ceaa593ea4ef 100644 --- a/sound/mips/sgio2audio.c +++ b/sound/mips/sgio2audio.c @@ -976,15 +976,4 @@ static struct platform_driver sgio2audio_driver = { } }; -static int __init alsa_card_sgio2audio_init(void) -{ - return platform_driver_register(&sgio2audio_driver); -} - -static void __exit alsa_card_sgio2audio_exit(void) -{ - platform_driver_unregister(&sgio2audio_driver); -} - -module_init(alsa_card_sgio2audio_init) -module_exit(alsa_card_sgio2audio_exit) +module_platform_driver(sgio2audio_driver); -- cgit v1.2.3-58-ga151