aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/scx200_acb.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2006-08-14 15:33:54 -0400
committerJohn W. Linville <linville@tuxdriver.com>2006-08-14 15:33:54 -0400
commite9ffb3d7ec94083a44a8721681391beca2ffd68c (patch)
tree6768ab487b3f44c2a4995ee61307e47760ca9b88 /drivers/i2c/busses/scx200_acb.c
parent8b9411014e6f18a883c18b38f41338dbd53fddea (diff)
parente9fa4f7bd291c29a785666e2fa5a9cf3241ee6c3 (diff)
Merge branch 'from-linus' into upstream
Diffstat (limited to 'drivers/i2c/busses/scx200_acb.c')
-rw-r--r--drivers/i2c/busses/scx200_acb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c
index ced309ff056..eae9e81be37 100644
--- a/drivers/i2c/busses/scx200_acb.c
+++ b/drivers/i2c/busses/scx200_acb.c
@@ -232,7 +232,7 @@ static void scx200_acb_poll(struct scx200_acb_iface *iface)
unsigned long timeout;
timeout = jiffies + POLL_TIMEOUT;
- while (time_before(jiffies, timeout)) {
+ while (1) {
status = inb(ACBST);
/* Reset the status register to avoid the hang */
@@ -242,7 +242,10 @@ static void scx200_acb_poll(struct scx200_acb_iface *iface)
scx200_acb_machine(iface, status);
return;
}
- yield();
+ if (time_after(jiffies, timeout))
+ break;
+ cpu_relax();
+ cond_resched();
}
dev_err(&iface->adapter.dev, "timeout in state %s\n",