diff options
author | David Fries <David@Fries.net> | 2014-01-16 05:29:14 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-08 00:40:17 +0100 |
commit | af8c7237b082acefb996878a21a87017059b2c52 (patch) | |
tree | 18fb2bde4eba67f96d64261bda0854bcf2db3630 /drivers | |
parent | w1: fixup search to support abort from netlink (diff) | |
download | linux-af8c7237b082acefb996878a21a87017059b2c52.tar.xz linux-af8c7237b082acefb996878a21a87017059b2c52.zip |
w1: Only wake up the search process if it is going to be searching
It's valid to set the search count to 0 to stop searching, so don't
wake up the search thread to not search.
Signed-off-by: David Fries <David@Fries.net>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/w1/w1.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index 67b6d5fb25bc..92766a9f8b4d 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c @@ -243,7 +243,9 @@ static ssize_t w1_master_attribute_store_search(struct device * dev, mutex_lock(&md->mutex); md->search_count = tmp; mutex_unlock(&md->mutex); - wake_up_process(md->thread); + /* Only wake if it is going to be searching. */ + if (tmp) + wake_up_process(md->thread); return count; } |