All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Cc: Ben Gardner <gardner.ben@gmail.com>,
	Evgeniy Polyakov <johnpol@2ka.mipt.ru>,
	Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 2/3] [PATCH] w1: fix idle check loop in ds2482
Date: Wed, 12 Jul 2006 16:24:55 -0700	[thread overview]
Message-ID: <11527467003943-git-send-email-greg@kroah.com> (raw)
In-Reply-To: <11527466963731-git-send-email-greg@kroah.com>

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 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


  reply	other threads:[~2006-07-12 23:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-12 23:22 [GIT PATCH] W1 patches for 2.6.18-rc1 Greg KH
2006-07-12 23:24 ` [PATCH 1/3] [PATCH] W1: remove w1 mail list from lm_sensors Greg KH
2006-07-12 23:24   ` Greg KH [this message]
2006-07-12 23:24     ` [PATCH 3/3] [PATCH] w1: remove drivers/w1/w1.h Greg KH
2006-07-13  0:25       ` Nish Aravamudan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11527467003943-git-send-email-greg@kroah.com \
    --to=greg@kroah.com \
    --cc=gardner.ben@gmail.com \
    --cc=gregkh@suse.de \
    --cc=johnpol@2ka.mipt.ru \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.