[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1388299556-12669-4-git-send-email-David@Fries.net>
Date: Sun, 29 Dec 2013 00:45:45 -0600
From: David Fries <David@...es.net>
To: linux-kernel@...r.kernel.org
Cc: Evgeniy Polyakov <zbr@...emap.net>,
Marcin Jurkowski <marcin1j@...il.com>,
Josh Boyer <jwboyer@...il.com>,
Sven Geggus <lists@...hsschwanzdomain.de>
Subject: [PATCH 03/14] 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@...es.net>
Cc: Evgeniy Polyakov <zbr@...emap.net>
---
drivers/w1/w1.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 67b6d5f..92766a9 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;
}
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists