polling loops: change exit condition to
PATCH 10/21 polling loops: change exit condition to
ISDN SUBSYSTEM
P: Karsten Keil
M: [email protected]
P: Kai Germaschewski
M: [email protected]
Signed-off-by Marcin Slusarz <[email protected]>
drivers/isdn/hysdn/boardergo.c +4 -2
@@ -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