patch-2.4.19 linux-2.4.19/drivers/i2c/i2c-algo-bit.c

Next file: linux-2.4.19/drivers/i2c/i2c-core.c
Previous file: linux-2.4.19/drivers/i2c/i2c-adap-ite.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/drivers/i2c/i2c-algo-bit.c linux-2.4.19/drivers/i2c/i2c-algo-bit.c
@@ -49,7 +49,7 @@
 /* respectively. This makes sure that the algorithm works. Some chips   */
 /* might not like this, as they have an internal timeout of some mils	*/
 /*
-#define SLO_IO      jif=jiffies;while(jiffies<=jif+i2c_table[minor].veryslow)\
+#define SLO_IO      jif=jiffies;while(time_before_eq(jiffies, jif+i2c_table[minor].veryslow))\
                         if (need_resched) schedule();
 */
 
@@ -117,7 +117,7 @@
  		 * while they are processing data internally. 
  		 */
 		setscl(adap,1);
-		if (start+adap->timeout <= jiffies) {
+		if (time_after_eq(jiffies, start+adap->timeout)) {
 			return -ETIMEDOUT;
 		}
 		if (current->need_resched)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)