diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/i2c/busses/scx200_acb.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index ced309ff056f..eae9e81be375 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) | |||
| 232 | unsigned long timeout; | 232 | unsigned long timeout; |
| 233 | 233 | ||
| 234 | timeout = jiffies + POLL_TIMEOUT; | 234 | timeout = jiffies + POLL_TIMEOUT; |
| 235 | while (time_before(jiffies, timeout)) { | 235 | while (1) { |
| 236 | status = inb(ACBST); | 236 | status = inb(ACBST); |
| 237 | 237 | ||
| 238 | /* Reset the status register to avoid the hang */ | 238 | /* Reset the status register to avoid the hang */ |
| @@ -242,7 +242,10 @@ static void scx200_acb_poll(struct scx200_acb_iface *iface) | |||
| 242 | scx200_acb_machine(iface, status); | 242 | scx200_acb_machine(iface, status); |
| 243 | return; | 243 | return; |
| 244 | } | 244 | } |
| 245 | yield(); | 245 | if (time_after(jiffies, timeout)) |
| 246 | break; | ||
| 247 | cpu_relax(); | ||
| 248 | cond_resched(); | ||
| 246 | } | 249 | } |
| 247 | 250 | ||
| 248 | dev_err(&iface->adapter.dev, "timeout in state %s\n", | 251 | dev_err(&iface->adapter.dev, "timeout in state %s\n", |
