summaryrefslogtreecommitdiff
path: root/sound/core/info.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-12-25 10:40:34 (GMT)
committerTakashi Iwai <tiwai@suse.de>2008-12-25 10:40:34 (GMT)
commit5ce442fe2c9423ec5451222aee6f9b2127bb8311 (patch)
tree9cb12cf2c4ab5a8af5de219c22eade3908b5cb59 /sound/core/info.c
parent60cda2b53a7826d273198f668cd124f0eeda0e4a (diff)
parent2af752936b311a846622668f8b0f1893d8eccade (diff)
downloadlinux-fsl-qoriq-5ce442fe2c9423ec5451222aee6f9b2127bb8311.tar.xz
Merge branch 'topic/udev-id-rename' into to-push
Diffstat (limited to 'sound/core/info.c')
-rw-r--r--sound/core/info.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/core/info.c b/sound/core/info.c
index 527b207..70fa871 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -653,6 +653,23 @@ int snd_info_card_register(struct snd_card *card)
}
/*
+ * 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
*/