aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/info.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/info.c')
-rw-r--r--sound/core/info.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/sound/core/info.c b/sound/core/info.c
index c7f41c3bbd5c..3c9bd6b10a96 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -153,13 +153,6 @@ EXPORT_SYMBOL(snd_seq_root);
153struct snd_info_entry *snd_oss_root; 153struct snd_info_entry *snd_oss_root;
154#endif 154#endif
155 155
156static void snd_remove_proc_entry(struct proc_dir_entry *parent,
157 struct proc_dir_entry *de)
158{
159 if (de)
160 remove_proc_entry(de->name, parent);
161}
162
163static loff_t snd_info_entry_llseek(struct file *file, loff_t offset, int orig) 156static loff_t snd_info_entry_llseek(struct file *file, loff_t offset, int orig)
164{ 157{
165 struct snd_info_private_data *data; 158 struct snd_info_private_data *data;
@@ -580,7 +573,7 @@ int __exit snd_info_done(void)
580#ifdef CONFIG_SND_OSSEMUL 573#ifdef CONFIG_SND_OSSEMUL
581 snd_info_free_entry(snd_oss_root); 574 snd_info_free_entry(snd_oss_root);
582#endif 575#endif
583 snd_remove_proc_entry(NULL, snd_proc_root); 576 proc_remove(snd_proc_root);
584 } 577 }
585 return 0; 578 return 0;
586} 579}
@@ -642,7 +635,7 @@ void snd_info_card_id_change(struct snd_card *card)
642{ 635{
643 mutex_lock(&info_mutex); 636 mutex_lock(&info_mutex);
644 if (card->proc_root_link) { 637 if (card->proc_root_link) {
645 snd_remove_proc_entry(snd_proc_root, card->proc_root_link); 638 proc_remove(card->proc_root_link);
646 card->proc_root_link = NULL; 639 card->proc_root_link = NULL;
647 } 640 }
648 if (strcmp(card->id, card->proc_root->name)) 641 if (strcmp(card->id, card->proc_root->name))
@@ -661,10 +654,8 @@ void snd_info_card_disconnect(struct snd_card *card)
661 if (!card) 654 if (!card)
662 return; 655 return;
663 mutex_lock(&info_mutex); 656 mutex_lock(&info_mutex);
664 if (card->proc_root_link) { 657 proc_remove(card->proc_root_link);
665 snd_remove_proc_entry(snd_proc_root, card->proc_root_link); 658 card->proc_root_link = NULL;
666 card->proc_root_link = NULL;
667 }
668 if (card->proc_root) 659 if (card->proc_root)
669 snd_info_disconnect(card->proc_root); 660 snd_info_disconnect(card->proc_root);
670 mutex_unlock(&info_mutex); 661 mutex_unlock(&info_mutex);
@@ -856,7 +847,7 @@ static void snd_info_disconnect(struct snd_info_entry *entry)
856 list_del_init(&entry->list); 847 list_del_init(&entry->list);
857 root = entry->parent == NULL ? snd_proc_root : entry->parent->p; 848 root = entry->parent == NULL ? snd_proc_root : entry->parent->p;
858 snd_BUG_ON(!root); 849 snd_BUG_ON(!root);
859 snd_remove_proc_entry(root, entry->p); 850 proc_remove(entry->p);
860 entry->p = NULL; 851 entry->p = NULL;
861} 852}
862 853