diff options
author | Jean Delvare <khali@linux-fr.org> | 2006-06-12 15:49:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-22 14:10:35 -0400 |
commit | 397e2f66a23469e2b8a13b764cb2d9ff2444ad5a (patch) | |
tree | 188283532b9ae804752b30cf8d5ac5c8739a53e2 /drivers | |
parent | 62aaa288ab0425b058fd337c5135a32e8c1aeace (diff) |
[PATCH] i2c-i801: Fix block transaction poll loops
i2c-i801: Fix block transaction poll loops
Two of the three poll loops have the poll and sleep swapped,
causing an extra sleep to occur after the polled condition is
fulfilled. In practice, this doubles the amount of sleep time for
every block transaction.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/i2c-i801.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index dfca74933625..4396dc91d5f5 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c | |||
@@ -334,8 +334,8 @@ static int i801_block_transaction(union i2c_smbus_data *data, char read_write, | |||
334 | /* We will always wait for a fraction of a second! */ | 334 | /* We will always wait for a fraction of a second! */ |
335 | timeout = 0; | 335 | timeout = 0; |
336 | do { | 336 | do { |
337 | temp = inb_p(SMBHSTSTS); | ||
338 | msleep(1); | 337 | msleep(1); |
338 | temp = inb_p(SMBHSTSTS); | ||
339 | } | 339 | } |
340 | while ((!(temp & 0x80)) | 340 | while ((!(temp & 0x80)) |
341 | && (timeout++ < MAX_TIMEOUT)); | 341 | && (timeout++ < MAX_TIMEOUT)); |
@@ -393,8 +393,8 @@ static int i801_block_transaction(union i2c_smbus_data *data, char read_write, | |||
393 | /* wait for INTR bit as advised by Intel */ | 393 | /* wait for INTR bit as advised by Intel */ |
394 | timeout = 0; | 394 | timeout = 0; |
395 | do { | 395 | do { |
396 | temp = inb_p(SMBHSTSTS); | ||
397 | msleep(1); | 396 | msleep(1); |
397 | temp = inb_p(SMBHSTSTS); | ||
398 | } while ((!(temp & 0x02)) | 398 | } while ((!(temp & 0x02)) |
399 | && (timeout++ < MAX_TIMEOUT)); | 399 | && (timeout++ < MAX_TIMEOUT)); |
400 | 400 | ||