From ef9f0a42db987e7e2df72289fb4522d24027786b Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Mon, 16 Jan 2006 16:31:42 +0100 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Takashi Iwai --- include/sound/i2c.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/sound/i2c.h') diff --git a/include/sound/i2c.h b/include/sound/i2c.h index 81eb23ed761f..d125ff8c85e8 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); -- cgit