From: Ben Gardner Date: Thu, 29 Jun 2006 18:33:22 +0000 (+0400) Subject: [PATCH] w1: fix idle check loop in ds2482 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b4786f1893305312d0a3e602de9080b1b932a681;p=openwrt%2Fstaging%2Fblogic.git [PATCH] w1: fix idle check loop in ds2482 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 Signed-off-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c index af492cc48db2..d93eb626b2f0 100644 --- a/drivers/w1/masters/ds2482.c +++ b/drivers/w1/masters/ds2482.c @@ -218,7 +218,7 @@ static int ds2482_wait_1wire_idle(struct ds2482_data *pdev) 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)