Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4786f18 authored by Ben Gardner's avatar Ben Gardner Committed by Greg Kroah-Hartman
Browse files

[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: default avatarBen Gardner <gardner.ben@gmail.com>
Signed-off-by: default avatarEvgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4e35dea2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)