diff options
author | Dave Airlie <airlied@redhat.com> | 2009-05-05 02:39:24 -0400 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2009-05-05 02:39:24 -0400 |
commit | 0cdba07bb23cdd3e0d64357ec3d983e6b75e541f (patch) | |
tree | 2be7fb0ed8b0e1a7a478d79e33fc742daa27fb35 /drivers/i2c/algos/i2c-algo-bit.c | |
parent | 4ccc28f725bc2b7b0a3bc27e9c15f4eaf63fb812 (diff) |
i2c-algo-bit: Fix timeout test
When fetching DDC using i2c algo bit, we were often seeing timeouts
before getting valid EDID on a retry. The VESA spec states 2ms is the
DDC timeout, so when this translates into 1 jiffie and we are close
to the end of the time period, it could return with a timeout less than
2ms.
Change this code to use time_after instead of time_after_eq.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/algos/i2c-algo-bit.c')
-rw-r--r-- | drivers/i2c/algos/i2c-algo-bit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c index d420cc5f5633..e25e13980af3 100644 --- a/drivers/i2c/algos/i2c-algo-bit.c +++ b/drivers/i2c/algos/i2c-algo-bit.c | |||
@@ -104,7 +104,7 @@ static int sclhi(struct i2c_algo_bit_data *adap) | |||
104 | * chips may hold it low ("clock stretching") while they | 104 | * chips may hold it low ("clock stretching") while they |
105 | * are processing data internally. | 105 | * are processing data internally. |
106 | */ | 106 | */ |
107 | if (time_after_eq(jiffies, start + adap->timeout)) | 107 | if (time_after(jiffies, start + adap->timeout)) |
108 | return -ETIMEDOUT; | 108 | return -ETIMEDOUT; |
109 | cond_resched(); | 109 | cond_resched(); |
110 | } | 110 | } |