diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2010-03-11 00:23:49 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-13 00:52:43 +0100 |
commit | 6786073927c3ff3eb7fc3d2192e761e86fa0d352 (patch) | |
tree | 229745c49dfad6d410ed905b89aaa69bd62e2670 | |
parent | serial amba-pl010: enable PPS support (diff) | |
download | linux-6786073927c3ff3eb7fc3d2192e761e86fa0d352.tar.xz linux-6786073927c3ff3eb7fc3d2192e761e86fa0d352.zip |
w1: fix test in ds2482_wait_1wire_idle()
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>
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | 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 406caa6a71cb..e5f74416d4b7 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); |