Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288493
b: refs/heads/master
c: 8ee161c
h: refs/heads/master
i:
  288491: dac0bc7
v: v3
  • Loading branch information
Ville Syrjala authored and Jean Delvare committed Mar 15, 2012
1 parent 2afedf9 commit 443f94b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: 834aa6f30c2f5f5ab7c858e37800c1a19dfde2fb
refs/heads/master: 8ee161ce5e0cfc689eb677f227a6248191165fac
8 changes: 7 additions & 1 deletion trunk/drivers/i2c/algos/i2c-algo-bit.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,14 @@ static int sclhi(struct i2c_algo_bit_data *adap)
* chips may hold it low ("clock stretching") while they
* are processing data internally.
*/
if (time_after(jiffies, start + adap->timeout))
if (time_after(jiffies, start + adap->timeout)) {
/* Test one last time, as we may have been preempted
* between last check and timeout test.
*/
if (getscl(adap))
break;
return -ETIMEDOUT;
}
cond_resched();
}
#ifdef DEBUG
Expand Down

0 comments on commit 443f94b

Please sign in to comment.