* [PATCH] w1: fix test in ds2482_wait_1wire_idle()
@ 2009-12-27 21:32 Roel Kluin
0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-12-27 21:32 UTC (permalink / raw)
To: Evgeniy Polyakov, Andrew Morton, LKML
With `while (++retries < DS2482_WAIT_IDLE_TIMEOUT)' retries reaches
DS2482_WAIT_IDLE_TIMEOUT after the loop
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
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 406caa6..e5f7441 100644
--- a/drivers/w1/masters/ds2482.c
+++ b/drivers/w1/masters/ds2482.c
@@ -214,7 +214,7 @@ static int ds2482_wait_1wire_idle(struct ds2482_data *pdev)
(++retries < DS2482_WAIT_IDLE_TIMEOUT));
}
- if (retries > DS2482_WAIT_IDLE_TIMEOUT)
+ if (retries >= DS2482_WAIT_IDLE_TIMEOUT)
printk(KERN_ERR "%s: timeout on channel %d\n",
__func__, pdev->channel);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-12-27 21:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-27 21:32 [PATCH] w1: fix test in ds2482_wait_1wire_idle() Roel Kluin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox