提交 91ad1203 编写于 作者: R Roel Kluin 提交者: Linus Torvalds

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: NRoel Kluin <roel.kluin@gmail.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 eb8972b4
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册