X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fsound%2Fi2c.h;fp=include%2Fsound%2Fi2c.h;h=81eb23ed761fa1490eaf6a620d8eaa479820f282;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=d125ff8c85e851888b82fee527d9aebb004bed6b;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/include/sound/i2c.h b/include/sound/i2c.h index d125ff8c8..81eb23ed7 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 mutex lock_mutex; + struct semaphore 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) - mutex_lock(&bus->master->lock_mutex); + down(&bus->master->lock_mutex); else - mutex_lock(&bus->lock_mutex); + down(&bus->lock_mutex); } static inline void snd_i2c_unlock(struct snd_i2c_bus *bus) { if (bus->master) - mutex_unlock(&bus->master->lock_mutex); + up(&bus->master->lock_mutex); else - mutex_unlock(&bus->lock_mutex); + up(&bus->lock_mutex); } int snd_i2c_sendbytes(struct snd_i2c_device *device, unsigned char *bytes, int count);