Update of /cvsroot/alsa/alsa-kernel/include
In directory sc8-pr-cvs1:/tmp/cvs-serv22557/include
Modified Files:
i2c.h
Log Message:
- fixed sleep in lock. use mutex for the locking.
Index: i2c.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/include/i2c.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- i2c.h 24 Apr 2002 07:57:08 -0000 1.4
+++ i2c.h 13 Nov 2003 11:19:30 -0000 1.5
@@ -58,7 +58,7 @@
snd_card_t *card; /* card which I2C belongs to */
char name[32]; /* some useful label */
- spinlock_t lock;
+ struct semaphore lock_mutex;
snd_i2c_bus_t *master; /* master bus when SCK/SCL is shared */
struct list_head buses; /* master: slave buses sharing SCK/SCL, slave: link
list */
@@ -84,15 +84,15 @@
static inline void snd_i2c_lock(snd_i2c_bus_t *bus) {
if (bus->master)
- spin_lock(&bus->master->lock);
+ down(&bus->master->lock_mutex);
else
- spin_lock(&bus->lock);
+ down(&bus->lock_mutex);
}
static inline void snd_i2c_unlock(snd_i2c_bus_t *bus) {
if (bus->master)
- spin_unlock(&bus->master->lock);
+ up(&bus->master->lock_mutex);
else
- spin_unlock(&bus->lock);
+ up(&bus->lock_mutex);
}
int snd_i2c_sendbytes(snd_i2c_device_t *device, unsigned char *bytes, int count);
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog