Skip to contentSkip to conversation

polling loops: change exit condition to

PATCH In review Marcin Slusarz 1 participant 1 message Dec 4, 2005 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 10/21 polling loops: change exit condition to

ISDN SUBSYSTEM
P: Karsten Keil
M: [email protected]
P: Kai Germaschewski
M: [email protected]

drivers/isdn/hysdn/boardergo.c +4 -2
diff -upr -X linux-2.6.15-rc4/Documentation/dontdiff linux-2.6.15-rc4-orig/drivers/isdn/hysdn/boardergo.c linux-2.6.15-rc4/drivers/isdn/hysdn/boardergo.c
@@ -329,14 +329,16 @@ static int
 ergo_waitpofready(struct HYSDN_CARD *card)
 {
 	tErgDpram *dpr = card->dpram;	/* pointer to DPRAM structure */
-	int timecnt = 10000 / 50;	/* timeout is 10 secs max. */
+	unsigned long end_time;
 	ulong flags;
 	int msg_size;
 	int i;
 
 	if (card->debug_flags & LOG_POF_CARD)
 		hysdn_addlog(card, "ERGO: waiting for pof ready");
-	while (timecnt--) {
+
+	end_time = jiffies + msecs_to_jiffies(10000); /* timeout is 10 secs max. */
+	while (time_before(jiffies, end_time)) {
 		/* wait until timeout  */
 
 		if (dpr->ToPcFlag) {

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors