diff options
author | Tejun Heo <tj@kernel.org> | 2011-05-24 03:59:36 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-05-24 03:59:36 -0400 |
commit | 6988f20fe04e9ef3aea488cb8ab57fbeb78e12f0 (patch) | |
tree | c9d7fc50a2e2147a5ca07e3096e7eeb916ad2da9 /sound/core/init.c | |
parent | 0415b00d175e0d8945e6785aad21b5f157976ce0 (diff) | |
parent | 6ea0c34dac89611126455537552cffe6c7e832ad (diff) |
Merge branch 'fixes-2.6.39' into for-2.6.40
Diffstat (limited to 'sound/core/init.c')
-rw-r--r-- | sound/core/init.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/core/init.c b/sound/core/init.c index 3e65da21a08..a0080aa45ae 100644 --- a/sound/core/init.c +++ b/sound/core/init.c | |||
@@ -848,6 +848,7 @@ int snd_card_file_add(struct snd_card *card, struct file *file) | |||
848 | return -ENOMEM; | 848 | return -ENOMEM; |
849 | mfile->file = file; | 849 | mfile->file = file; |
850 | mfile->disconnected_f_op = NULL; | 850 | mfile->disconnected_f_op = NULL; |
851 | INIT_LIST_HEAD(&mfile->shutdown_list); | ||
851 | spin_lock(&card->files_lock); | 852 | spin_lock(&card->files_lock); |
852 | if (card->shutdown) { | 853 | if (card->shutdown) { |
853 | spin_unlock(&card->files_lock); | 854 | spin_unlock(&card->files_lock); |
@@ -883,6 +884,9 @@ int snd_card_file_remove(struct snd_card *card, struct file *file) | |||
883 | list_for_each_entry(mfile, &card->files_list, list) { | 884 | list_for_each_entry(mfile, &card->files_list, list) { |
884 | if (mfile->file == file) { | 885 | if (mfile->file == file) { |
885 | list_del(&mfile->list); | 886 | list_del(&mfile->list); |
887 | spin_lock(&shutdown_lock); | ||
888 | list_del(&mfile->shutdown_list); | ||
889 | spin_unlock(&shutdown_lock); | ||
886 | if (mfile->disconnected_f_op) | 890 | if (mfile->disconnected_f_op) |
887 | fops_put(mfile->disconnected_f_op); | 891 | fops_put(mfile->disconnected_f_op); |
888 | found = mfile; | 892 | found = mfile; |