From b2b12605c42f12bd367f16509b83813bcb84a258 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sat, 5 Aug 2006 12:15:19 -0700 Subject: [PATCH] --- yaml --- r: 33259 b: refs/heads/master c: 3e3183bab0257a6d02038658c53b491e1378612f h: refs/heads/master i: 33257: 3841c478f2766459d5de29d84babea290b2a2ae6 33255: 1043504716ec256a6faf8372f5caf9cf42d5a9c5 v: v3 --- [refs] | 2 +- trunk/drivers/i2c/busses/scx200_acb.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 1a37802664ae..a8bb6eb28c8f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 225add619624b4877941470f31d297e0151b21be +refs/heads/master: 3e3183bab0257a6d02038658c53b491e1378612f diff --git a/trunk/drivers/i2c/busses/scx200_acb.c b/trunk/drivers/i2c/busses/scx200_acb.c index ced309ff056f..eae9e81be375 100644 --- a/trunk/drivers/i2c/busses/scx200_acb.c +++ b/trunk/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",