]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/w1/w1.c
w1: Only wake up the search process if it is going to be searching
[karo-tx-linux.git] / drivers / w1 / w1.c
index 67b6d5fb25bc35f7d41e0e17ca4f7ad1168cf12c..92766a9f8b4d71e69314edcfd682c1edf9071f00 100644 (file)
@@ -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;
 }