int __exit snd_info_done(void) { snd_card_info_done(); #ifdef CONFIG_SND_OSSEMUL snd_minor_info_oss_done(); #endif snd_minor_info_done(); #ifdef CONFIG_SND_DEBUG_MEMORY snd_memory_info_done(); #endif snd_info_version_done(); if (snd_proc_root) { #ifdef CONFIG_SND_SEQUENCER if (snd_seq_root) snd_info_unregister(snd_seq_root); #endif snd_remove_proc_entry(snd_proc_root, snd_proc_dev); snd_remove_proc_entry(&proc_root, snd_proc_root); } return 0; }
int snd_info_unregister(snd_info_entry_t * entry) { struct proc_dir_entry *root; snd_assert(entry != NULL && entry->p != NULL, return -ENXIO); root = entry->parent == NULL ? snd_proc_root : entry->parent->p; snd_assert(root, return -ENXIO); down(&info_mutex); snd_remove_proc_entry(root, entry->p); up(&info_mutex); snd_info_free_entry(entry); return 0; }
int __exit snd_info_done(void) { snd_card_info_done(); snd_minor_info_oss_done(); snd_minor_info_done(); snd_info_version_done(); if (snd_proc_root) { #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) snd_info_free_entry(snd_seq_root); #endif #ifdef CONFIG_SND_OSSEMUL snd_info_free_entry(snd_oss_root); #endif snd_remove_proc_entry(&proc_root, snd_proc_root); } return 0; }
int snd_info_card_unregister(snd_card_t * card) { void *data; snd_assert(card != NULL, return -ENXIO); if (card->proc_root_link) { data = card->proc_root_link->data; card->proc_root_link->data = NULL; kfree(data); snd_remove_proc_entry(snd_proc_root, card->proc_root_link); card->proc_root_link = NULL; } if (card->proc_root) { snd_info_unregister(card->proc_root); card->proc_root = NULL; } return 0; }
void snd_info_free_device(snd_info_entry_t * entry) { #ifdef CONFIG_DEVFS_FS char dname[32]; devfs_handle_t master; #endif snd_runtime_check(entry, return); down(&info_mutex); snd_remove_proc_entry(snd_proc_dev, entry->p); up(&info_mutex); #ifdef CONFIG_DEVFS_FS if (entry->p && strncmp(entry->name, "controlC", 8)) { sprintf(dname, "snd/%s", entry->name); master = devfs_find_handle(NULL, dname, 0, 0, DEVFS_SPECIAL_CHR, 0); devfs_unregister(master); } #endif snd_info_free_entry(entry); }