aboutsummaryrefslogtreecommitdiff
path: root/sound/drivers/opl3/opl3_synth.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-10-30 11:59:15 +0100
committerJaroslav Kysela <perex@perex.cz>2008-01-31 17:29:13 +0100
commit05c1afe75fcebf456017ec186811cf1599f4360e (patch)
tree3000085048bb79d54f61c993c2b8e5eb1bd0618f /sound/drivers/opl3/opl3_synth.c
parent224a033252bba46c5c8b5df625f5e781ca138f48 (diff)
downloadlinux-2.6.34-ux500-05c1afe75fcebf456017ec186811cf1599f4360e.tar.gz
[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.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/sound/drivers/opl3/opl3_synth.c b/sound/drivers/opl3/opl3_synth.c
index d55eefce44c..a7bf7a4b1f8 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;
}