aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1/w1_int.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/w1/w1_int.c')
-rw-r--r--drivers/w1/w1_int.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c
index cf18f1324f03..35e85d961702 100644
--- a/drivers/w1/w1_int.c
+++ b/drivers/w1/w1_int.c
@@ -124,10 +124,9 @@ int w1_add_master_device(struct w1_bus_master *master)
124 124
125 /* validate minimum functionality */ 125 /* validate minimum functionality */
126 if (!(master->touch_bit && master->reset_bus) && 126 if (!(master->touch_bit && master->reset_bus) &&
127 !(master->write_bit && master->read_bit)) 127 !(master->write_bit && master->read_bit)) {
128 { 128 printk(KERN_ERR "w1_add_master_device: invalid function set\n");
129 printk(KERN_ERR "w1_add_master_device: invalid function set\n"); 129 return(-EINVAL);
130 return(-EINVAL);
131 } 130 }
132 131
133 dev = w1_alloc_dev(w1_ids++, w1_max_slave_count, w1_max_slave_ttl, &w1_driver, &w1_device); 132 dev = w1_alloc_dev(w1_ids++, w1_max_slave_count, w1_max_slave_ttl, &w1_driver, &w1_device);
@@ -163,7 +162,7 @@ int w1_add_master_device(struct w1_bus_master *master)
163 return 0; 162 return 0;
164 163
165err_out_kill_thread: 164err_out_kill_thread:
166 dev->need_exit = 1; 165 set_bit(W1_MASTER_NEED_EXIT, &dev->flags);
167 if (kill_proc(dev->kpid, SIGTERM, 1)) 166 if (kill_proc(dev->kpid, SIGTERM, 1))
168 dev_err(&dev->dev, 167 dev_err(&dev->dev,
169 "Failed to send signal to w1 kernel thread %d.\n", 168 "Failed to send signal to w1 kernel thread %d.\n",
@@ -181,7 +180,7 @@ void __w1_remove_master_device(struct w1_master *dev)
181 int err; 180 int err;
182 struct w1_netlink_msg msg; 181 struct w1_netlink_msg msg;
183 182
184 dev->need_exit = 1; 183 set_bit(W1_MASTER_NEED_EXIT, &dev->flags);
185 err = kill_proc(dev->kpid, SIGTERM, 1); 184 err = kill_proc(dev->kpid, SIGTERM, 1);
186 if (err) 185 if (err)
187 dev_err(&dev->dev, 186 dev_err(&dev->dev,