patch-2.2.0-pre1 linux/drivers/isdn/avmb1/b1lli.c

Next file: linux/drivers/isdn/hisax/callc.c
Previous file: linux/drivers/char/videodev.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.132/linux/drivers/isdn/avmb1/b1lli.c linux/drivers/isdn/avmb1/b1lli.c
@@ -173,7 +173,7 @@
 static inline unsigned char B1_get_byte(unsigned short base)
 {
 	unsigned long i = jiffies + 5 * HZ;	/* maximum wait time 5 sec */
-	while (!B1_rx_full(base) && i > jiffies);
+	while (!B1_rx_full(base) && time_before(jiffies, i));
 	if (B1_rx_full(base))
 		return inb(base + B1_READ);
 	printk(KERN_CRIT "b1lli: rx not full after 5 second\n");
@@ -477,7 +477,7 @@
 
 	if (loaddebug)
 		printk(KERN_DEBUG "b1capi: loaded: wait 1 ..\n");
-	for (i = jiffies + 10 * HZ; i > jiffies;) {
+	for (i = jiffies + 10 * HZ; time_before(jiffies, i);) {
 		if (B1_tx_empty(base))
 			break;
 	}
@@ -487,7 +487,7 @@
 	}
 	B1_put_byte(base, SEND_POLL);
 	printk(KERN_DEBUG "b1capi: loaded: wait 2 ..\n");
-	for (i = jiffies + 10 * HZ; i > jiffies;) {
+	for (i = jiffies + 10 * HZ; time_before(jiffies, i);) {
 		if (B1_rx_full(base)) {
 			if ((ans = B1_get_byte(base)) == RECEIVE_POLL) {
 				if (loaddebug)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov