From: Roel Kluin <roel.kluin@gmail.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: video4linux-list@redhat.com, linux-media@vger.kernel.org
Subject: [PATCH] newport: newport_*wait() return 0 on timeout
Date: Sat, 31 Jan 2009 16:29:39 +0100 [thread overview]
Message-ID: <49846E63.8070507@gmail.com> (raw)
With a postfix decrement t reaches -1 on timeout which results in a
return of 0.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/include/video/newport.h b/include/video/newport.h
index 1f5ebea..001b935 100644
--- a/include/video/newport.h
+++ b/include/video/newport.h
@@ -453,7 +453,7 @@ static __inline__ int newport_wait(struct newport_regs *regs)
{
int t = BUSY_TIMEOUT;
- while (t--)
+ while (--t)
if (!(regs->cset.status & NPORT_STAT_GBUSY))
break;
return !t;
@@ -463,7 +463,7 @@ static __inline__ int newport_bfwait(struct newport_regs *regs)
{
int t = BUSY_TIMEOUT;
- while (t--)
+ while (--t)
if(!(regs->cset.status & NPORT_STAT_BBUSY))
break;
return !t;
next reply other threads:[~2009-01-31 15:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-31 15:29 Roel Kluin [this message]
2009-02-02 12:08 ` [PATCH] newport: newport_*wait() return 0 on timeout Mauro Carvalho Chehab
2009-02-02 13:32 ` roel kluin
2009-02-02 16:04 ` Randy Dunlap
2009-02-02 16:09 ` Mauro Carvalho Chehab
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=49846E63.8070507@gmail.com \
--to=roel.kluin@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=video4linux-list@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox