]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
ALSA: Convert mips directory to module_platform_driver
authorAxel Lin <axel.lin@gmail.com>
Thu, 24 Nov 2011 10:47:25 +0000 (18:47 +0800)
committerTakashi Iwai <tiwai@suse.de>
Thu, 24 Nov 2011 12:03:02 +0000 (13:03 +0100)
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/mips/hal2.c
sound/mips/sgio2audio.c

index 2e6c85894e0be4481bf4d37994f4abfb5e21f780..5f88d1f09ffeef01f3fd9d0cc1a5746972ec1e90 100644 (file)
@@ -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);
index 69425d4c91fd1522e517afeb4a7524c70c2a8eb3..ceaa593ea4ef632d9f8ad4a6333ded19c0602684 100644 (file)
@@ -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);