diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-05-15 19:49:05 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-06-22 21:33:37 +0200 |
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 8313f97907d..02c8cc4ebff 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c @@ -81,14 +81,9 @@ extern struct class *sound_class; */ void snd_request_card(int card) { - int locked; - if (! current->fs->root) return; - read_lock(&snd_card_rwlock); - locked = snd_cards_lock & (1 << card); - read_unlock(&snd_card_rwlock); - if (locked) + if (snd_card_locked(card)) return; if (card < 0 || card >= cards_limit) return; |