* [lm-sensors] [PATCH 35/44] [PATCH] i2c-i801: Fix block transaction
@ 2006-06-22 18:28 Greg KH
0 siblings, 0 replies; only message in thread
From: Greg KH @ 2006-06-22 18:28 UTC (permalink / raw)
To: lm-sensors
From: Jean Delvare <khali at linux-fr.org>
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 at linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
---
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 dfca749..4396dc9 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
/* We will always wait for a fraction of a second! */
timeout = 0;
do {
- temp = inb_p(SMBHSTSTS);
msleep(1);
+ temp = inb_p(SMBHSTSTS);
}
while ((!(temp & 0x80))
&& (timeout++ < MAX_TIMEOUT));
@@ -393,8 +393,8 @@ static int i801_block_transaction(union
/* wait for INTR bit as advised by Intel */
timeout = 0;
do {
- temp = inb_p(SMBHSTSTS);
msleep(1);
+ temp = inb_p(SMBHSTSTS);
} while ((!(temp & 0x02))
&& (timeout++ < MAX_TIMEOUT));
--
1.4.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-06-22 18:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-22 18:28 [lm-sensors] [PATCH 35/44] [PATCH] i2c-i801: Fix block transaction Greg KH
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.