At Mon, 9 Feb 2009 09:39:34 +0100, Florian Mickler wrote:
Hi!
For example, the recent SUSE init script has the following
mod=$(grep -m1 -E '^(snd[^ ]*|ac97_bus) [0-9]+ 0' /proc/modules) while [ -n "$mod" ]; do mod=${mod%% *} /sbin/modprobe -r $mod mod=$(grep -m1 -E '^(snd[^ ]*|ac97_bus) [0-9]+ 0' /proc/modules) done
But, basically it's stupid to unload modules at shtudown/reboot, just a waste of time. If possible, you should check the next runlevel and skip unloading if unnecessary.
Takashi
Yeah, it _is_ stupid to unload modules at shutdown. (and I kicked it out of my init-script... but one wonders how it's supposed to work)
modprobe -r snd_hda_codec_analog gives me an error (''in use'')
The codec driver is indeed used by the controller driver, snd-hda-intel.
Takashi
# lsmod | grep snd_; modprobe -r snd_hda_codec_analog snd_pcm_oss 42112 0 snd_mixer_oss 16224 1 snd_pcm_oss snd_hda_codec_analog 78144 1 snd_hda_intel 28264 0 snd_hda_codec 68992 2 snd_hda_codec_analog,snd_hda_intel snd_pcm 86440 3 snd_pcm_oss,snd_hda_intel,snd_hda_codec snd_timer 23472 1 snd_pcm snd_page_alloc 10288 2 snd_hda_intel,snd_pcm FATAL: Module snd_hda_codec_analog is in use.
...so, if i accidentially don't unload snd_hda_intel before snd_hda_codec_analog it doesn't work? or are my tools somehow broken?