ALSA: use subsys_initcall for sound core instead of module_init
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Tue, 12 Jan 2010 22:20:39 +0000 (20:20 -0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 14 Jan 2010 20:21:47 +0000 (21:21 +0100)
This is needed for built-in drivers which are built before the sound directory,
like thinkpad_acpi.

Otherwise, registering a card fails.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/sound.c
sound/sound_core.c

index 7872a02..563d196 100644 (file)
@@ -468,5 +468,5 @@ static void __exit alsa_sound_exit(void)
        unregister_chrdev(major, "alsa");
 }
 
-module_init(alsa_sound_init)
-module_exit(alsa_sound_exit)
+subsys_initcall(alsa_sound_init);
+module_exit(alsa_sound_exit);
index dbca7c9..7c2d677 100644 (file)
@@ -61,7 +61,7 @@ static void __exit cleanup_soundcore(void)
        class_destroy(sound_class);
 }
 
-module_init(init_soundcore);
+subsys_initcall(init_soundcore);
 module_exit(cleanup_soundcore);