Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131738
b: refs/heads/master
c: a746b57
h: refs/heads/master
v: v3
  • Loading branch information
Roel Kluin authored and Jean Delvare committed Feb 24, 2009
1 parent cc2f675 commit 9db321b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f29d2e0275a4f03ef2fd158e484508dcb0c64efb
refs/heads/master: a746b578d8406b2db0e9f0d040061bc1f78433cf
4 changes: 2 additions & 2 deletions trunk/drivers/i2c/busses/i2c-amd8111.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static unsigned int amd_ec_wait_write(struct amd_smbus *smbus)
{
int timeout = 500;

while (timeout-- && (inb(smbus->base + AMD_EC_SC) & AMD_EC_SC_IBF))
while ((inb(smbus->base + AMD_EC_SC) & AMD_EC_SC_IBF) && --timeout)
udelay(1);

if (!timeout) {
Expand All @@ -88,7 +88,7 @@ static unsigned int amd_ec_wait_read(struct amd_smbus *smbus)
{
int timeout = 500;

while (timeout-- && (~inb(smbus->base + AMD_EC_SC) & AMD_EC_SC_OBF))
while ((~inb(smbus->base + AMD_EC_SC) & AMD_EC_SC_OBF) && --timeout)
udelay(1);

if (!timeout) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/i2c/busses/i2c-pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ static int i2c_pxa_do_pio_xfer(struct pxa_i2c *i2c,

i2c_pxa_start_message(i2c);

while (timeout-- && i2c->msg_num > 0) {
while (i2c->msg_num > 0 && --timeout) {
i2c_pxa_handler(0, i2c);
udelay(10);
}
Expand Down

0 comments on commit 9db321b

Please sign in to comment.