diff options
author | David Fries <david@fries.net> | 2008-10-16 01:04:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-16 14:21:49 -0400 |
commit | 3c52e4e627896b42152cc6ff98216c302932227e (patch) | |
tree | 811992a651418cfcd8a606317e2abae26447b9f9 /drivers/w1/w1_int.c | |
parent | 01e14d6db9654be005a0a5384090aea2cde39976 (diff) |
W1: w1_process, block or sleep
The w1_process thread's sleeping and termination has been modified.
msleep_interruptible was replaced by schedule_timeout and schedule to
allow for kthread_stop and wake_up_process to interrupt the sleep and the
unbounded sleeping when a bus search is disabled. The W1_MASTER_NEED_EXIT
and flags variable were removed as they were redundant with
kthread_should_stop and kthread_stop. If w1_process is sleeping,
requesting a search will immediately wake it up rather than waiting for
the end of msleep_interruptible previously.
Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/w1/w1_int.c')
-rw-r--r-- | drivers/w1/w1_int.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c index 36ff40250b61..bd877b24ce42 100644 --- a/drivers/w1/w1_int.c +++ b/drivers/w1/w1_int.c | |||
@@ -142,7 +142,6 @@ int w1_add_master_device(struct w1_bus_master *master) | |||
142 | 142 | ||
143 | #if 0 /* Thread cleanup code, not required currently. */ | 143 | #if 0 /* Thread cleanup code, not required currently. */ |
144 | err_out_kill_thread: | 144 | err_out_kill_thread: |
145 | set_bit(W1_MASTER_NEED_EXIT, &dev->flags); | ||
146 | kthread_stop(dev->thread); | 145 | kthread_stop(dev->thread); |
147 | #endif | 146 | #endif |
148 | err_out_rm_attr: | 147 | err_out_rm_attr: |
@@ -158,7 +157,6 @@ void __w1_remove_master_device(struct w1_master *dev) | |||
158 | struct w1_netlink_msg msg; | 157 | struct w1_netlink_msg msg; |
159 | struct w1_slave *sl, *sln; | 158 | struct w1_slave *sl, *sln; |
160 | 159 | ||
161 | set_bit(W1_MASTER_NEED_EXIT, &dev->flags); | ||
162 | kthread_stop(dev->thread); | 160 | kthread_stop(dev->thread); |
163 | 161 | ||
164 | mutex_lock(&w1_mlock); | 162 | mutex_lock(&w1_mlock); |