From: Roel Kluin Date: Tue, 31 Mar 2009 22:25:30 +0000 (-0700) Subject: fbdev: newport: newport_*wait() return 0 on timeout X-Git-Tag: v2.6.30-rc1~439 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=91ad1203535da95bb13072bdb59e1dc3ca76ec5d;p=~emulex%2Finfiniband.git 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 Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/video/newport.h b/include/video/newport.h index 1f5ebeaa818..001b935e71c 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;