Skip to content

Commit

Permalink
ALSA: use subsys_initcall for sound core instead of module_init
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Thadeu Lima de Souza Cascardo authored and tiwai committed Jan 14, 2010
1 parent 7284ce6 commit c181a13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sound/core/sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
2 changes: 1 addition & 1 deletion sound/sound_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);


Expand Down

0 comments on commit c181a13

Please sign in to comment.