[ALSA] Fix disconnection of proc interface

- Add the linked list to each proc entry to enable a single-shot
  disconnection (unregister)
- Deprecate snd_info_unregister(), use snd_info_free_entry()
- Removed NULL checks of snd_info_free_entry()

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This commit is contained in:
Takashi Iwai
2006-06-23 14:37:59 +02:00
committed by Jaroslav Kysela
parent 42750b04c5
commit 746d4a02e6
21 changed files with 123 additions and 172 deletions

View File

@@ -310,6 +310,7 @@ int snd_card_disconnect(struct snd_card *card)
if (err < 0)
snd_printk(KERN_ERR "not all devices for card %i can be disconnected\n", card->number);
snd_info_card_disconnect(card);
return 0;
}
@@ -360,7 +361,7 @@ int snd_card_free(struct snd_card *card)
}
if (card->private_free)
card->private_free(card);
snd_info_unregister(card->proc_id);
snd_info_free_entry(card->proc_id);
if (snd_info_card_free(card) < 0) {
snd_printk(KERN_WARNING "unable to free card info\n");
/* Not fatal error */
@@ -625,9 +626,9 @@ int __init snd_card_info_init(void)
int __exit snd_card_info_done(void)
{
snd_info_unregister(snd_card_info_entry);
snd_info_free_entry(snd_card_info_entry);
#ifdef MODULE
snd_info_unregister(snd_card_module_info_entry);
snd_info_free_entry(snd_card_module_info_entry);
#endif
return 0;
}