Skip to content

Commit

Permalink
[PATCH] w1: fix idle check loop in ds2482
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Gardner authored and Greg Kroah-Hartman committed Jul 12, 2006
1 parent 4e35dea commit b4786f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/w1/masters/ds2482.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b4786f1

Please sign in to comment.