[PATCH 2/3] increase w1_therm race condition window

From: David Fries
Date: Sat Mar 07 2015 - 20:53:54 EST


Also disable the check for external power as the current setup
doesn't have it.
---
drivers/w1/slaves/w1_therm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c
index 6b3ef93..cb46e85 100644
--- a/drivers/w1/slaves/w1_therm.c
+++ b/drivers/w1/slaves/w1_therm.c
@@ -244,9 +244,11 @@ static ssize_t w1_slave_show(struct device *device,

w1_write_8(dev, W1_CONVERT_TEMP);

- if (external_power) {
+ /*if (external_power)*/ if(true) {
mutex_unlock(&dev->bus_mutex);

+ //sleep_rem = msleep_interruptible(tm);
+ sleep_rem = msleep_interruptible(10*1000);
if (sleep_rem != 0) {
ret = -EINTR;
goto post_unlock;
--
1.7.10.4