blob: df3505af7ec428b65d73f78359a44cf12accd1ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
From johnpol@2ka.mipt.ru Thu Jun 29 11:33:32 2006
Date: Thu, 29 Jun 2006 22:33:22 +0400
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: GregKH <greg@kroah.com>
Subject: w1: fix idle check loop in ds2482
Message-ID: <20060629183322.GC2336@2ka.mipt.ru>
Content-Disposition: inline
From: Ben Gardner <gardner.ben@gmail.com>
The idle check loop has a greater-than where it should have a less-than.
This causes the ds2482 driver to check for the idle condition exactly
once, which causes it to fail on faster machines.
Signed-off-by: Ben Gardner <gardner.ben@gmail.com>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/w1/masters/ds2482.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- gregkh-2.6.orig/drivers/w1/masters/ds2482.c
+++ gregkh-2.6/drivers/w1/masters/ds2482.c
@@ -218,7 +218,7 @@ static int ds2482_wait_1wire_idle(struct
do {
temp = i2c_smbus_read_byte(&pdev->client);
} while ((temp >= 0) && (temp & DS2482_REG_STS_1WB) &&
- (++retries > DS2482_WAIT_IDLE_TIMEOUT));
+ (++retries < DS2482_WAIT_IDLE_TIMEOUT));
}
if (retries > DS2482_WAIT_IDLE_TIMEOUT)
|