diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-01-16 16:29:08 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 10:24:50 +0100 |
commit | 1a60d4c5a0c4028559585a74e48593b16e1ca9b2 (patch) | |
tree | f03f8dfcd554f8ebbb295522dc46dfe4d110a484 /sound/core/oss/mixer_oss.c | |
parent | f0283f45a04d5cf31512e5e390a38504d97e7a97 (diff) | |
download | linux-1a60d4c5a0c4028559585a74e48593b16e1ca9b2.tar.gz linux-1a60d4c5a0c4028559585a74e48593b16e1ca9b2.tar.bz2 linux-1a60d4c5a0c4028559585a74e48593b16e1ca9b2.zip |
[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.c | 14 |
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, struct snd_mixer_oss *mixer = entry->private_data; int i; - down(&mixer->reg_mutex); + mutex_lock(&mixer->reg_mutex); for (i = 0; i < SNDRV_OSS_MAX_MIXERS; i++) { struct slot *p; @@ -1110,7 +1110,7 @@ static void snd_mixer_oss_proc_read(struct snd_info_entry *entry, else snd_iprintf(buffer, "\"\" 0\n"); } - up(&mixer->reg_mutex); + mutex_unlock(&mixer->reg_mutex); } static 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, cptr = snd_info_get_str(str, cptr, sizeof(str)); if (! *str) { /* remove the entry */ - down(&mixer->reg_mutex); + mutex_lock(&mixer->reg_mutex); mixer_slot_clear(&mixer->slots[ch]); - up(&mixer->reg_mutex); + mutex_unlock(&mixer->reg_mutex); continue; } snd_info_get_str(idxstr, cptr, sizeof(idxstr)); @@ -1145,7 +1145,7 @@ static void snd_mixer_oss_proc_write(struct snd_info_entry *entry, snd_printk(KERN_ERR "mixer_oss: invalid index %d\n", idx); continue; } - down(&mixer->reg_mutex); + mutex_lock(&mixer->reg_mutex); slot = (struct slot *)mixer->slots[ch].private_data; if (slot && slot->assigned && 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, kfree(tbl); } __unlock: - up(&mixer->reg_mutex); + mutex_unlock(&mixer->reg_mutex); } } @@ -1288,7 +1288,7 @@ static int snd_mixer_oss_notify_handler(struct snd_card *card, int cmd) mixer = kcalloc(2, sizeof(*mixer), GFP_KERNEL); if (mixer == NULL) return -ENOMEM; - init_MUTEX(&mixer->reg_mutex); + mutex_init(&mixer->reg_mutex); sprintf(name, "mixer%i%i", card->number, 0); if ((err = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MIXER, card, 0, |