aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/oss/mixer_oss.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-16 10:29:08 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-22 04:24:50 -0500
commit1a60d4c5a0c4028559585a74e48593b16e1ca9b2 (patch)
treef03f8dfcd554f8ebbb295522dc46dfe4d110a484 /sound/core/oss/mixer_oss.c
parentf0283f45a04d5cf31512e5e390a38504d97e7a97 (diff)
[ALSA] semaphore -> mutex (core 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/core/oss/mixer_oss.c')
-rw-r--r--sound/core/oss/mixer_oss.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
index f08e65a2bffe..9c68bc3f97aa 100644
--- a/sound/core/oss/mixer_oss.c
+++ b/sound/core/oss/mixer_oss.c
@@ -1095,7 +1095,7 @@ static void snd_mixer_oss_proc_read(struct snd_info_entry *entry,
1095 struct snd_mixer_oss *mixer = entry->private_data; 1095 struct snd_mixer_oss *mixer = entry->private_data;
1096 int i; 1096 int i;
1097 1097
1098 down(&mixer->reg_mutex); 1098 mutex_lock(&mixer->reg_mutex);
1099 for (i = 0; i < SNDRV_OSS_MAX_MIXERS; i++) { 1099 for (i = 0; i < SNDRV_OSS_MAX_MIXERS; i++) {
1100 struct slot *p; 1100 struct slot *p;
1101 1101
@@ -1110,7 +1110,7 @@ static void snd_mixer_oss_proc_read(struct snd_info_entry *entry,
1110 else 1110 else
1111 snd_iprintf(buffer, "\"\" 0\n"); 1111 snd_iprintf(buffer, "\"\" 0\n");
1112 } 1112 }
1113 up(&mixer->reg_mutex); 1113 mutex_unlock(&mixer->reg_mutex);
1114} 1114}
1115 1115
1116static void snd_mixer_oss_proc_write(struct snd_info_entry *entry, 1116static void snd_mixer_oss_proc_write(struct snd_info_entry *entry,
@@ -1134,9 +1134,9 @@ static void snd_mixer_oss_proc_write(struct snd_info_entry *entry,
1134 cptr = snd_info_get_str(str, cptr, sizeof(str)); 1134 cptr = snd_info_get_str(str, cptr, sizeof(str));
1135 if (! *str) { 1135 if (! *str) {
1136 /* remove the entry */ 1136 /* remove the entry */
1137 down(&mixer->reg_mutex); 1137 mutex_lock(&mixer->reg_mutex);
1138 mixer_slot_clear(&mixer->slots[ch]); 1138 mixer_slot_clear(&mixer->slots[ch]);
1139 up(&mixer->reg_mutex); 1139 mutex_unlock(&mixer->reg_mutex);
1140 continue; 1140 continue;
1141 } 1141 }
1142 snd_info_get_str(idxstr, cptr, sizeof(idxstr)); 1142 snd_info_get_str(idxstr, cptr, sizeof(idxstr));
@@ -1145,7 +1145,7 @@ static void snd_mixer_oss_proc_write(struct snd_info_entry *entry,
1145 snd_printk(KERN_ERR "mixer_oss: invalid index %d\n", idx); 1145 snd_printk(KERN_ERR "mixer_oss: invalid index %d\n", idx);
1146 continue; 1146 continue;
1147 } 1147 }
1148 down(&mixer->reg_mutex); 1148 mutex_lock(&mixer->reg_mutex);
1149 slot = (struct slot *)mixer->slots[ch].private_data; 1149 slot = (struct slot *)mixer->slots[ch].private_data;
1150 if (slot && slot->assigned && 1150 if (slot && slot->assigned &&
1151 slot->assigned->index == idx && ! strcmp(slot->assigned->name, str)) 1151 slot->assigned->index == idx && ! strcmp(slot->assigned->name, str))
@@ -1168,7 +1168,7 @@ static void snd_mixer_oss_proc_write(struct snd_info_entry *entry,
1168 kfree(tbl); 1168 kfree(tbl);
1169 } 1169 }
1170 __unlock: 1170 __unlock:
1171 up(&mixer->reg_mutex); 1171 mutex_unlock(&mixer->reg_mutex);
1172 } 1172 }
1173} 1173}
1174 1174
@@ -1288,7 +1288,7 @@ static int snd_mixer_oss_notify_handler(struct snd_card *card, int cmd)
1288 mixer = kcalloc(2, sizeof(*mixer), GFP_KERNEL); 1288 mixer = kcalloc(2, sizeof(*mixer), GFP_KERNEL);
1289 if (mixer == NULL) 1289 if (mixer == NULL)
1290 return -ENOMEM; 1290 return -ENOMEM;
1291 init_MUTEX(&mixer->reg_mutex); 1291 mutex_init(&mixer->reg_mutex);
1292 sprintf(name, "mixer%i%i", card->number, 0); 1292 sprintf(name, "mixer%i%i", card->number, 0);
1293 if ((err = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MIXER, 1293 if ((err = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MIXER,
1294 card, 0, 1294 card, 0,