diff options
author | Evgeniy Polyakov <johnpol@2ka.mipt.ru> | 2005-08-11 09:27:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-09-08 17:41:26 -0400 |
commit | 3aca692d3ec7cf89da4575f598e41f74502b22d7 (patch) | |
tree | 84740dbcf1ea648b303020f2106e7f9e46f92835 /drivers/w1/w1_int.c | |
parent | d2a4ef6a0ce4d841293b49bf2cdc17a0ebfaaf9d (diff) |
[PATCH] w1: Detouching bug fixed.
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.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c index c13724fd0971..c3f67eafc7ec 100644 --- a/drivers/w1/w1_int.c +++ b/drivers/w1/w1_int.c | |||
@@ -76,7 +76,6 @@ static struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl, | |||
76 | INIT_LIST_HEAD(&dev->slist); | 76 | INIT_LIST_HEAD(&dev->slist); |
77 | init_MUTEX(&dev->mutex); | 77 | init_MUTEX(&dev->mutex); |
78 | 78 | ||
79 | init_completion(&dev->dev_released); | ||
80 | init_completion(&dev->dev_exited); | 79 | init_completion(&dev->dev_exited); |
81 | 80 | ||
82 | memcpy(&dev->dev, device, sizeof(struct device)); | 81 | memcpy(&dev->dev, device, sizeof(struct device)); |
@@ -107,9 +106,6 @@ static struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl, | |||
107 | void w1_free_dev(struct w1_master *dev) | 106 | void w1_free_dev(struct w1_master *dev) |
108 | { | 107 | { |
109 | device_unregister(&dev->dev); | 108 | device_unregister(&dev->dev); |
110 | dev_fini_netlink(dev); | ||
111 | memset(dev, 0, sizeof(struct w1_master) + sizeof(struct w1_bus_master)); | ||
112 | kfree(dev); | ||
113 | } | 109 | } |
114 | 110 | ||
115 | int w1_add_master_device(struct w1_bus_master *master) | 111 | int w1_add_master_device(struct w1_bus_master *master) |
@@ -184,7 +180,7 @@ void __w1_remove_master_device(struct w1_master *dev) | |||
184 | __func__, dev->kpid); | 180 | __func__, dev->kpid); |
185 | 181 | ||
186 | while (atomic_read(&dev->refcnt)) { | 182 | while (atomic_read(&dev->refcnt)) { |
187 | printk(KERN_INFO "Waiting for %s to become free: refcnt=%d.\n", | 183 | dev_dbg(&dev->dev, "Waiting for %s to become free: refcnt=%d.\n", |
188 | dev->name, atomic_read(&dev->refcnt)); | 184 | dev->name, atomic_read(&dev->refcnt)); |
189 | 185 | ||
190 | if (msleep_interruptible(1000)) | 186 | if (msleep_interruptible(1000)) |