提交 af8c7237 编写于 作者: D David Fries 提交者: Greg Kroah-Hartman

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: NDavid Fries <David@Fries.net>
Acked-by: NEvgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 42105698
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册