X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=sound%2Fcore%2Finit.c;h=30ecad41403c1becb741f7312ca247eb96054b8c;hb=ee9ec4f82049c678373a611ce20ac67fe9ad836e;hp=3e65da21a08c0398f78f5aa32da004dbe08a1c6d;hpb=fd57ed021990157ee5b3997c3f21c734093a9e23;p=karo-tx-linux.git diff --git a/sound/core/init.c b/sound/core/init.c index 3e65da21a08c..30ecad41403c 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -514,7 +514,7 @@ static void snd_card_set_id_no_lock(struct snd_card *card, const char *nid) id = card->id; if (*id == '\0') - strcpy(id, "default"); + strcpy(id, "Default"); while (1) { if (loops-- == 0) { @@ -848,6 +848,7 @@ int snd_card_file_add(struct snd_card *card, struct file *file) return -ENOMEM; mfile->file = file; mfile->disconnected_f_op = NULL; + INIT_LIST_HEAD(&mfile->shutdown_list); spin_lock(&card->files_lock); if (card->shutdown) { spin_unlock(&card->files_lock); @@ -883,6 +884,9 @@ int snd_card_file_remove(struct snd_card *card, struct file *file) list_for_each_entry(mfile, &card->files_list, list) { if (mfile->file == file) { list_del(&mfile->list); + spin_lock(&shutdown_lock); + list_del(&mfile->shutdown_list); + spin_unlock(&shutdown_lock); if (mfile->disconnected_f_op) fops_put(mfile->disconnected_f_op); found = mfile;