summaryrefslogtreecommitdiff
path: root/drivers/w1/w1_int.c
diff options
context:
space:
mode:
authorEvgeniy Polyakov <johnpol@2ka.mipt.ru>2006-04-03 12:04:27 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-22 22:22:50 +0400
commitabd52a13206e02537ca1dc08fc5438c7d27bdbf1 (patch)
treeefe0ff89898aad10600d392ac727dcea9e7af322 /drivers/w1/w1_int.c
parent46e07f6e5eb0e465e086b8f485f4238bd453e3e9 (diff)
downloadlinux-abd52a13206e02537ca1dc08fc5438c7d27bdbf1.tar.xz
[PATCH] w1: Use mutexes instead of semaphores.
Use mutexes instead of semaphores. Patch tested on x86_64 and i386 with test bus master driver. Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/w1/w1_int.c')
-rw-r--r--drivers/w1/w1_int.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c
index ae78473d11f9..24e7c102fa75 100644
--- a/drivers/w1/w1_int.c
+++ b/drivers/w1/w1_int.c
@@ -36,7 +36,7 @@ extern struct device w1_master_device;
extern int w1_max_slave_count;
extern int w1_max_slave_ttl;
extern struct list_head w1_masters;
-extern struct semaphore w1_mlock;
+extern struct mutex w1_mlock;
extern int w1_process(void *);
@@ -74,7 +74,7 @@ static struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl,
atomic_set(&dev->refcnt, 2);
INIT_LIST_HEAD(&dev->slist);
- init_MUTEX(&dev->mutex);
+ mutex_init(&dev->mutex);
memcpy(&dev->dev, device, sizeof(struct device));
snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id),
@@ -135,9 +135,9 @@ int w1_add_master_device(struct w1_bus_master *master)
dev->initialized = 1;
- down(&w1_mlock);
+ mutex_lock(&w1_mlock);
list_add(&dev->w1_master_entry, &w1_masters);
- up(&w1_mlock);
+ mutex_unlock(&w1_mlock);
memset(&msg, 0, sizeof(msg));
msg.id.mst.id = dev->id;