diff options
Diffstat (limited to 'drivers/w1/w1_int.c')
-rw-r--r-- | drivers/w1/w1_int.c | 8 |
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; | |||
36 | extern int w1_max_slave_count; | 36 | extern int w1_max_slave_count; |
37 | extern int w1_max_slave_ttl; | 37 | extern int w1_max_slave_ttl; |
38 | extern struct list_head w1_masters; | 38 | extern struct list_head w1_masters; |
39 | extern struct semaphore w1_mlock; | 39 | extern struct mutex w1_mlock; |
40 | 40 | ||
41 | extern int w1_process(void *); | 41 | extern int w1_process(void *); |
42 | 42 | ||
@@ -74,7 +74,7 @@ static struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl, | |||
74 | atomic_set(&dev->refcnt, 2); | 74 | atomic_set(&dev->refcnt, 2); |
75 | 75 | ||
76 | INIT_LIST_HEAD(&dev->slist); | 76 | INIT_LIST_HEAD(&dev->slist); |
77 | init_MUTEX(&dev->mutex); | 77 | mutex_init(&dev->mutex); |
78 | 78 | ||
79 | memcpy(&dev->dev, device, sizeof(struct device)); | 79 | memcpy(&dev->dev, device, sizeof(struct device)); |
80 | snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), | 80 | snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), |
@@ -135,9 +135,9 @@ int w1_add_master_device(struct w1_bus_master *master) | |||
135 | 135 | ||
136 | dev->initialized = 1; | 136 | dev->initialized = 1; |
137 | 137 | ||
138 | down(&w1_mlock); | 138 | mutex_lock(&w1_mlock); |
139 | list_add(&dev->w1_master_entry, &w1_masters); | 139 | list_add(&dev->w1_master_entry, &w1_masters); |
140 | up(&w1_mlock); | 140 | mutex_unlock(&w1_mlock); |
141 | 141 | ||
142 | memset(&msg, 0, sizeof(msg)); | 142 | memset(&msg, 0, sizeof(msg)); |
143 | msg.id.mst.id = dev->id; | 143 | msg.id.mst.id = dev->id; |