diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-01-16 16:31:42 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 10:24:57 +0100 |
commit | ef9f0a42db987e7e2df72289fb4522d24027786b (patch) | |
tree | 34f3ad0c1abdbeb6df5a1d5137db6b4f34695f5a /include | |
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 'include')
-rw-r--r-- | include/sound/emux_synth.h | 2 | ||||
-rw-r--r-- | include/sound/i2c.h | 10 | ||||
-rw-r--r-- | include/sound/opl3.h | 3 | ||||
-rw-r--r-- | include/sound/soundfont.h | 2 | ||||
-rw-r--r-- | include/sound/util_mem.h | 4 | ||||
-rw-r--r-- | include/sound/vx_core.h | 2 |
6 files changed, 13 insertions, 10 deletions
diff --git a/include/sound/emux_synth.h b/include/sound/emux_synth.h index b2d6b2acc7c..d8cb51b86c2 100644 --- a/include/sound/emux_synth.h +++ b/include/sound/emux_synth.h @@ -113,7 +113,7 @@ struct snd_emux { struct snd_emux_voice *voices; /* Voices (EMU 'channel') */ int use_time; /* allocation counter */ spinlock_t voice_lock; /* Lock for voice access */ - struct semaphore register_mutex; + struct mutex register_mutex; int client; /* For the sequencer client */ int ports[SNDRV_EMUX_MAX_PORTS]; /* The ports for this device */ struct snd_emux_port *portptrs[SNDRV_EMUX_MAX_PORTS]; diff --git a/include/sound/i2c.h b/include/sound/i2c.h index 81eb23ed761..d125ff8c85e 100644 --- a/include/sound/i2c.h +++ b/include/sound/i2c.h @@ -55,7 +55,7 @@ struct snd_i2c_bus { struct snd_card *card; /* card which I2C belongs to */ char name[32]; /* some useful label */ - struct semaphore lock_mutex; + struct mutex lock_mutex; struct snd_i2c_bus *master; /* master bus when SCK/SCL is shared */ struct list_head buses; /* master: slave buses sharing SCK/SCL, slave: link list */ @@ -84,17 +84,17 @@ int snd_i2c_device_free(struct snd_i2c_device *device); static inline void snd_i2c_lock(struct snd_i2c_bus *bus) { if (bus->master) - down(&bus->master->lock_mutex); + mutex_lock(&bus->master->lock_mutex); else - down(&bus->lock_mutex); + mutex_lock(&bus->lock_mutex); } static inline void snd_i2c_unlock(struct snd_i2c_bus *bus) { if (bus->master) - up(&bus->master->lock_mutex); + mutex_unlock(&bus->master->lock_mutex); else - up(&bus->lock_mutex); + mutex_unlock(&bus->lock_mutex); } int snd_i2c_sendbytes(struct snd_i2c_device *device, unsigned char *bytes, int count); diff --git a/include/sound/opl3.h b/include/sound/opl3.h index 83392641cb4..444907166f9 100644 --- a/include/sound/opl3.h +++ b/include/sound/opl3.h @@ -53,6 +53,7 @@ #include "driver.h" #include <linux/time.h> +#include <linux/mutex.h> #include "core.h" #include "hwdep.h" #include "timer.h" @@ -312,7 +313,7 @@ struct snd_opl3 { int sys_timer_status; /* system timer run status */ spinlock_t sys_timer_lock; /* Lock for system timer access */ #endif - struct semaphore access_mutex; /* locking */ + struct mutex access_mutex; /* locking */ }; /* opl3.c */ diff --git a/include/sound/soundfont.h b/include/sound/soundfont.h index 61a010c65d0..f95d99ba7f7 100644 --- a/include/sound/soundfont.h +++ b/include/sound/soundfont.h @@ -93,7 +93,7 @@ struct snd_sf_list { int sample_locked; /* locked time for sample */ struct snd_sf_callback callback; /* callback functions */ int presets_locked; - struct semaphore presets_mutex; + struct mutex presets_mutex; spinlock_t lock; struct snd_util_memhdr *memhdr; }; diff --git a/include/sound/util_mem.h b/include/sound/util_mem.h index 69944bbb544..a1fb706b59a 100644 --- a/include/sound/util_mem.h +++ b/include/sound/util_mem.h @@ -1,5 +1,7 @@ #ifndef __SOUND_UTIL_MEM_H #define __SOUND_UTIL_MEM_H + +#include <linux/mutex.h> /* * Copyright (C) 2000 Takashi Iwai <tiwai@suse.de> * @@ -40,7 +42,7 @@ struct snd_util_memhdr { int nblocks; /* # of allocated blocks */ unsigned int used; /* used memory size */ int block_extra_size; /* extra data size of chunk */ - struct semaphore block_mutex; /* lock */ + struct mutex block_mutex; /* lock */ }; /* diff --git a/include/sound/vx_core.h b/include/sound/vx_core.h index 5fd6f3305e0..9821a6194ca 100644 --- a/include/sound/vx_core.h +++ b/include/sound/vx_core.h @@ -206,7 +206,7 @@ struct vx_core { int audio_monitor[4]; /* playback hw-monitor level */ unsigned char audio_monitor_active[4]; /* playback hw-monitor mute/unmute */ - struct semaphore mixer_mutex; + struct mutex mixer_mutex; const struct firmware *firmware[4]; /* loaded firmware data */ }; |