diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-05-15 17:49:05 (GMT) |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-06-22 19:33:37 (GMT) |
commit | 746df94898554b3d8e91d855e934852e626c701c (patch) | |
tree | dc312e426d52804d98080af18f12f5b14010d2e5 /sound/core/sound.c | |
parent | 0defb2672d7cde8d048eec35c183da7b88adbd9e (diff) | |
download | linux-fsl-qoriq-746df94898554b3d8e91d855e934852e626c701c.tar.xz |
[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 8313f97..02c8cc4 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; |