diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-24 14:41:41 +0200 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-24 19:07:53 +0200 |
commit | 816724e65c72a90a44fbad0ef0b59b186c85fa90 (patch) | |
tree | 421fa29aedff988e392f92780637553e275d37a0 /drivers/w1/w1_int.c | |
parent | Merge branch 'master' of /home/trondmy/kernel/linux-2.6/ (diff) | |
parent | [PATCH] fix typo in acpi video brightness changes. (diff) | |
download | linux-816724e65c72a90a44fbad0ef0b59b186c85fa90.tar.xz linux-816724e65c72a90a44fbad0ef0b59b186c85fa90.zip |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Conflicts:
fs/nfs/inode.c
fs/super.c
Fix conflicts between patch 'NFS: Split fs/nfs/inode.c' and patch
'VFS: Permit filesystem to override root dentry on mount'
Diffstat (limited to 'drivers/w1/w1_int.c')
-rw-r--r-- | drivers/w1/w1_int.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c index 68565aacec7b..357a2e0f637a 100644 --- a/drivers/w1/w1_int.c +++ b/drivers/w1/w1_int.c @@ -65,7 +65,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), @@ -74,16 +74,11 @@ static struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl, dev->driver = driver; - dev->groups = 1; dev->seq = 1; - dev_init_netlink(dev); err = device_register(&dev->dev); if (err) { printk(KERN_ERR "Failed to register master device. err=%d\n", err); - - dev_fini_netlink(dev); - memset(dev, 0, sizeof(struct w1_master)); kfree(dev); dev = NULL; @@ -131,12 +126,12 @@ int w1_add_master_device(struct w1_bus_master *master) dev->initialized = 1; - spin_lock(&w1_mlock); + mutex_lock(&w1_mlock); list_add(&dev->w1_master_entry, &w1_masters); - spin_unlock(&w1_mlock); + mutex_unlock(&w1_mlock); + memset(&msg, 0, sizeof(msg)); msg.id.mst.id = dev->id; - msg.id.mst.pid = dev->thread->pid; msg.type = W1_MASTER_ADD; w1_netlink_send(dev, &msg); @@ -153,7 +148,6 @@ err_out_free_dev: void __w1_remove_master_device(struct w1_master *dev) { struct w1_netlink_msg msg; - pid_t pid = dev->thread->pid; set_bit(W1_MASTER_NEED_EXIT, &dev->flags); kthread_stop(dev->thread); @@ -166,8 +160,8 @@ void __w1_remove_master_device(struct w1_master *dev) flush_signals(current); } + memset(&msg, 0, sizeof(msg)); msg.id.mst.id = dev->id; - msg.id.mst.pid = pid; msg.type = W1_MASTER_REMOVE; w1_netlink_send(dev, &msg); |