modify: i2c bug about 'I2C_MODE_POLL'
authorkfx <kfx@rock-chips.com>
Fri, 20 Aug 2010 03:09:19 +0000 (11:09 +0800)
committerkfx <kfx@rock-chips.com>
Fri, 20 Aug 2010 03:10:00 +0000 (11:10 +0800)
drivers/i2c/busses/i2c-rk2818.c

index 54dacbb14f93948c006bff3d1c8d0a017aa74037..4cd29a2667c0e4d505ae3006156ac1e0a5af41b8 100755 (executable)
@@ -214,7 +214,7 @@ static int wait_for_completion_poll_timeout(struct rk2818_i2c_data *i2c, unsigne
        unsigned int time = RK2818_DELAY_TIME;
        int res;
 
-       while(!time_after(jiffies, timeout))
+       while(!time_after(jiffies, jiffies + timeout))
        {
                res = rk2818_event_occurred(i2c);
                if(res)