[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>
This commit is contained in:

committed by
Jaroslav Kysela

parent
746d4a02e6
commit
c461482c80
@@ -156,7 +156,7 @@ static int __init rtctimer_init(void)
|
||||
static void __exit rtctimer_exit(void)
|
||||
{
|
||||
if (rtctimer) {
|
||||
snd_timer_global_unregister(rtctimer);
|
||||
snd_timer_global_free(rtctimer);
|
||||
rtctimer = NULL;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user