diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-10-30 11:59:15 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-01-31 17:29:13 +0100 |
commit | 05c1afe75fcebf456017ec186811cf1599f4360e (patch) | |
tree | 3000085048bb79d54f61c993c2b8e5eb1bd0618f /sound/drivers/opl3/opl3_synth.c | |
parent | [ALSA] opl3 - Use hwdep for patch loading (diff) | |
download | linux-05c1afe75fcebf456017ec186811cf1599f4360e.tar.xz linux-05c1afe75fcebf456017ec186811cf1599f4360e.zip |
[ALSA] opl3 - simplify exclusive access lock
Use the exclusive access lock in hwdep instead of the own one.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/drivers/opl3/opl3_synth.c')
-rw-r--r-- | sound/drivers/opl3/opl3_synth.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/sound/drivers/opl3/opl3_synth.c b/sound/drivers/opl3/opl3_synth.c index d55eefce44c1..a7bf7a4b1f85 100644 --- a/sound/drivers/opl3/opl3_synth.c +++ b/sound/drivers/opl3/opl3_synth.c @@ -76,16 +76,6 @@ static int snd_opl3_set_connection(struct snd_opl3 * opl3, int connection); */ int snd_opl3_open(struct snd_hwdep * hw, struct file *file) { - struct snd_opl3 *opl3 = hw->private_data; - - mutex_lock(&opl3->access_mutex); - if (opl3->used) { - mutex_unlock(&opl3->access_mutex); - return -EAGAIN; - } - opl3->used++; - mutex_unlock(&opl3->access_mutex); - return 0; } @@ -185,10 +175,6 @@ int snd_opl3_release(struct snd_hwdep * hw, struct file *file) struct snd_opl3 *opl3 = hw->private_data; snd_opl3_reset(opl3); - mutex_lock(&opl3->access_mutex); - opl3->used--; - mutex_unlock(&opl3->access_mutex); - return 0; } |