All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcin Slusarz <marcin.slusarz@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] [PATCH 10/21] polling loops: change exit condition to
Date: Sun, 04 Dec 2005 00:18:36 +0000	[thread overview]
Message-ID: <439235DC.8070900@gmail.com> (raw)

ISDN SUBSYSTEM
P:	Karsten Keil
M:	kkeil@suse.de
P:	Kai Germaschewski
M:	kai.germaschewski@gmx.de

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
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
--- linux-2.6.15-rc4-orig/drivers/isdn/hysdn/boardergo.c	2005-11-20 16:53:15.000000000 +0100
+++ linux-2.6.15-rc4/drivers/isdn/hysdn/boardergo.c	2005-12-03 16:53:10.000000000 +0100
@@ -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
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

                 reply	other threads:[~2005-12-04  0:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=439235DC.8070900@gmail.com \
    --to=marcin.slusarz@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.