summaryrefslogtreecommitdiffstats
path: root/include/sound/i2c.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-16 16:31:42 +0100
committerJaroslav Kysela <perex@suse.cz>2006-03-22 10:24:57 +0100
commitef9f0a42db987e7e2df72289fb4522d24027786b (patch)
tree34f3ad0c1abdbeb6df5a1d5137db6b4f34695f5a /include/sound/i2c.h
parent1a60d4c5a0c4028559585a74e48593b16e1ca9b2 (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/sound/i2c.h')
-rw-r--r--include/sound/i2c.h10
1 files changed, 5 insertions, 5 deletions
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);