diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-01-16 10:31:42 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 04:24:57 -0500 |
commit | ef9f0a42db987e7e2df72289fb4522d24027786b (patch) | |
tree | 34f3ad0c1abdbeb6df5a1d5137db6b4f34695f5a /sound/drivers/opl4/opl4_seq.c | |
parent | 1a60d4c5a0c4028559585a74e48593b16e1ca9b2 (diff) |
[ALSA] semaphore -> mutex (driver part)
Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers/opl4/opl4_seq.c')
-rw-r--r-- | sound/drivers/opl4/opl4_seq.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/drivers/opl4/opl4_seq.c b/sound/drivers/opl4/opl4_seq.c index e3480326e735..dc0dcdc6c313 100644 --- a/sound/drivers/opl4/opl4_seq.c +++ b/sound/drivers/opl4/opl4_seq.c | |||
@@ -62,10 +62,10 @@ static int snd_opl4_seq_use(void *private_data, struct snd_seq_port_subscribe *i | |||
62 | struct snd_opl4 *opl4 = private_data; | 62 | struct snd_opl4 *opl4 = private_data; |
63 | int err; | 63 | int err; |
64 | 64 | ||
65 | down(&opl4->access_mutex); | 65 | mutex_lock(&opl4->access_mutex); |
66 | 66 | ||
67 | if (opl4->used) { | 67 | if (opl4->used) { |
68 | up(&opl4->access_mutex); | 68 | mutex_unlock(&opl4->access_mutex); |
69 | return -EBUSY; | 69 | return -EBUSY; |
70 | } | 70 | } |
71 | opl4->used++; | 71 | opl4->used++; |
@@ -73,12 +73,12 @@ static int snd_opl4_seq_use(void *private_data, struct snd_seq_port_subscribe *i | |||
73 | if (info->sender.client != SNDRV_SEQ_CLIENT_SYSTEM) { | 73 | if (info->sender.client != SNDRV_SEQ_CLIENT_SYSTEM) { |
74 | err = snd_opl4_seq_use_inc(opl4); | 74 | err = snd_opl4_seq_use_inc(opl4); |
75 | if (err < 0) { | 75 | if (err < 0) { |
76 | up(&opl4->access_mutex); | 76 | mutex_unlock(&opl4->access_mutex); |
77 | return err; | 77 | return err; |
78 | } | 78 | } |
79 | } | 79 | } |
80 | 80 | ||
81 | up(&opl4->access_mutex); | 81 | mutex_unlock(&opl4->access_mutex); |
82 | 82 | ||
83 | snd_opl4_synth_reset(opl4); | 83 | snd_opl4_synth_reset(opl4); |
84 | return 0; | 84 | return 0; |
@@ -90,9 +90,9 @@ static int snd_opl4_seq_unuse(void *private_data, struct snd_seq_port_subscribe | |||
90 | 90 | ||
91 | snd_opl4_synth_shutdown(opl4); | 91 | snd_opl4_synth_shutdown(opl4); |
92 | 92 | ||
93 | down(&opl4->access_mutex); | 93 | mutex_lock(&opl4->access_mutex); |
94 | opl4->used--; | 94 | opl4->used--; |
95 | up(&opl4->access_mutex); | 95 | mutex_unlock(&opl4->access_mutex); |
96 | 96 | ||
97 | if (info->sender.client != SNDRV_SEQ_CLIENT_SYSTEM) | 97 | if (info->sender.client != SNDRV_SEQ_CLIENT_SYSTEM) |
98 | snd_opl4_seq_use_dec(opl4); | 98 | snd_opl4_seq_use_dec(opl4); |