diff options
Diffstat (limited to 'drivers/w1/w1.c')
-rw-r--r-- | drivers/w1/w1.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index aac03f151fe0..730faa49d8dc 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c | |||
@@ -813,21 +813,14 @@ int w1_process(void *data) | |||
813 | struct w1_master *dev = (struct w1_master *) data; | 813 | struct w1_master *dev = (struct w1_master *) data; |
814 | 814 | ||
815 | while (!kthread_should_stop() && !test_bit(W1_MASTER_NEED_EXIT, &dev->flags)) { | 815 | while (!kthread_should_stop() && !test_bit(W1_MASTER_NEED_EXIT, &dev->flags)) { |
816 | if (dev->search_count) { | ||
817 | mutex_lock(&dev->mutex); | ||
818 | w1_search_process(dev, W1_SEARCH); | ||
819 | mutex_unlock(&dev->mutex); | ||
820 | } | ||
821 | |||
816 | try_to_freeze(); | 822 | try_to_freeze(); |
817 | msleep_interruptible(w1_timeout * 1000); | 823 | msleep_interruptible(w1_timeout * 1000); |
818 | |||
819 | if (kthread_should_stop() || test_bit(W1_MASTER_NEED_EXIT, &dev->flags)) | ||
820 | break; | ||
821 | |||
822 | if (!dev->initialized) | ||
823 | continue; | ||
824 | |||
825 | if (dev->search_count == 0) | ||
826 | continue; | ||
827 | |||
828 | mutex_lock(&dev->mutex); | ||
829 | w1_search_process(dev, W1_SEARCH); | ||
830 | mutex_unlock(&dev->mutex); | ||
831 | } | 824 | } |
832 | 825 | ||
833 | atomic_dec(&dev->refcnt); | 826 | atomic_dec(&dev->refcnt); |