aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-viapro.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-viapro.c')
-rw-r--r--drivers/i2c/busses/i2c-viapro.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c
index e4b1543015af..a84a909e1234 100644
--- a/drivers/i2c/busses/i2c-viapro.c
+++ b/drivers/i2c/busses/i2c-viapro.c
@@ -165,10 +165,10 @@ static int vt596_transaction(u8 size)
165 do { 165 do {
166 msleep(1); 166 msleep(1);
167 temp = inb_p(SMBHSTSTS); 167 temp = inb_p(SMBHSTSTS);
168 } while ((temp & 0x01) && (timeout++ < MAX_TIMEOUT)); 168 } while ((temp & 0x01) && (++timeout < MAX_TIMEOUT));
169 169
170 /* If the SMBus is still busy, we give up */ 170 /* If the SMBus is still busy, we give up */
171 if (timeout >= MAX_TIMEOUT) { 171 if (timeout == MAX_TIMEOUT) {
172 result = -ETIMEDOUT; 172 result = -ETIMEDOUT;
173 dev_err(&vt596_adapter.dev, "SMBus timeout!\n"); 173 dev_err(&vt596_adapter.dev, "SMBus timeout!\n");
174 } 174 }