]> Pileus Git - ~andy/linux/blobdiff - sound/core/info.c
Merge branch 'devel' into next
[~andy/linux] / sound / core / info.c
index 527b207462b0849809f7843b5d6beace67966b66..70fa87189f3624694dc52ab3f04f48f13dba6fee 100644 (file)
@@ -652,6 +652,23 @@ int snd_info_card_register(struct snd_card *card)
        return 0;
 }
 
+/*
+ * called on card->id change
+ */
+void snd_info_card_id_change(struct snd_card *card)
+{
+       mutex_lock(&info_mutex);
+       if (card->proc_root_link) {
+               snd_remove_proc_entry(snd_proc_root, card->proc_root_link);
+               card->proc_root_link = NULL;
+       }
+       if (strcmp(card->id, card->proc_root->name))
+               card->proc_root_link = proc_symlink(card->id,
+                                                   snd_proc_root,
+                                                   card->proc_root->name);
+       mutex_unlock(&info_mutex);
+}
+
 /*
  * de-register the card proc file
  * called from init.c