[ALSA] Unregister device files at disconnection
authorTakashi Iwai <tiwai@suse.de>
Fri, 23 Jun 2006 12:38:23 +0000 (14:38 +0200)
committerJaroslav Kysela <perex@suse.cz>
Sat, 23 Sep 2006 08:36:58 +0000 (10:36 +0200)
commitc461482c8072bb073e6146db320d3da85cdc89ad
tree3b69cfd292a488a8cb57ac9b040bd2b1b1a1e26d
parent746d4a02e68499fc6c1f8d0c43d2271853ade181
[ALSA] Unregister device files at disconnection

Orignally proposed by Sam Revitch <sam.revitch@gmail.com>.
Unregister device files at disconnection to avoid the futher accesses.
Also, the dev_unregister callback is removed and replaced with the
combination of disconnect + free.
A new function snd_card_free_when_closed() is introduced, which is
used in USB disconnect callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
15 files changed:
include/sound/core.h
include/sound/timer.h
sound/core/control.c
sound/core/device.c
sound/core/hwdep.c
sound/core/init.c
sound/core/oss/mixer_oss.c
sound/core/oss/pcm_oss.c
sound/core/pcm.c
sound/core/rawmidi.c
sound/core/rtctimer.c
sound/core/seq/seq_device.c
sound/core/timer.c
sound/pci/ac97/ac97_codec.c
sound/usb/usbaudio.c