diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-05-15 13:49:05 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-06-22 15:33:37 -0400 |
commit | 746df94898554b3d8e91d855e934852e626c701c (patch) | |
tree | dc312e426d52804d98080af18f12f5b14010d2e5 /sound/core/sound.c | |
parent | 0defb2672d7cde8d048eec35c183da7b88adbd9e (diff) |
[ALSA] Fix rwlock around snd_iprintf() in sound core
Fixed rwlock around snd_iprintf() in sound core part.
Replaced with mutex.
Also, make mutex and flags static variables with addition of
snd_card_locked() function (just for sound.c).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/sound.c')
-rw-r--r-- | sound/core/sound.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sound/core/sound.c b/sound/core/sound.c index 8313f97907d8..02c8cc4ebffe 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c | |||
@@ -81,14 +81,9 @@ extern struct class *sound_class; | |||
81 | */ | 81 | */ |
82 | void snd_request_card(int card) | 82 | void snd_request_card(int card) |
83 | { | 83 | { |
84 | int locked; | ||
85 | |||
86 | if (! current->fs->root) | 84 | if (! current->fs->root) |
87 | return; | 85 | return; |
88 | read_lock(&snd_card_rwlock); | 86 | if (snd_card_locked(card)) |
89 | locked = snd_cards_lock & (1 << card); | ||
90 | read_unlock(&snd_card_rwlock); | ||
91 | if (locked) | ||
92 | return; | 87 | return; |
93 | if (card < 0 || card >= cards_limit) | 88 | if (card < 0 || card >= cards_limit) |
94 | return; | 89 | return; |