summaryrefslogtreecommitdiffstats
path: root/include/video
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-03-31 15:25:30 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-01 08:59:31 -0700
commit91ad1203535da95bb13072bdb59e1dc3ca76ec5d (patch)
tree06d8a81796bf3a2a79d7ce0f0357ca27c215a0b4 /include/video
parenteb8972b4407f81b07ea6fc71fd91f9fc7a35a81e (diff)
downloadop-kernel-dev-91ad1203535da95bb13072bdb59e1dc3ca76ec5d.zip
op-kernel-dev-91ad1203535da95bb13072bdb59e1dc3ca76ec5d.tar.gz
fbdev: newport: newport_*wait() return 0 on timeout
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> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/video')
-rw-r--r--include/video/newport.h4
1 files changed, 2 insertions, 2 deletions
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;
OpenPOWER on IntegriCloud