[PATCH 2/3] [PATCH] w1: fix idle check loop in ds2482

From: Greg KH
Date: Wed Jul 12 2006 - 19:27:32 EST


From: Ben Gardner <gardner.ben@xxxxxxxxx>

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@xxxxxxxxx>
Signed-off-by: Evgeniy Polyakov <johnpol@xxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
drivers/w1/masters/ds2482.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c
index af492cc..d93eb62 100644
--- a/drivers/w1/masters/ds2482.c
+++ b/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)
--
1.4.1

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/