[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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
46e07f6e5e
commit
abd52a1320
@@ -171,7 +171,7 @@ static void w1_cn_callback(void *data)
|
||||
goto out_cont;
|
||||
}
|
||||
|
||||
down(&dev->mutex);
|
||||
mutex_lock(&dev->mutex);
|
||||
|
||||
if (sl && w1_reset_select_slave(sl)) {
|
||||
err = -ENODEV;
|
||||
@@ -198,7 +198,7 @@ out_up:
|
||||
atomic_dec(&dev->refcnt);
|
||||
if (sl)
|
||||
atomic_dec(&sl->refcnt);
|
||||
up(&dev->mutex);
|
||||
mutex_unlock(&dev->mutex);
|
||||
out_cont:
|
||||
msg->len -= sizeof(struct w1_netlink_msg) + m->len;
|
||||
m = (struct w1_netlink_msg *)(((u8 *)m) + sizeof(struct w1_netlink_msg) + m->len);
|
||||
|
Reference in New Issue
Block a user