All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] newport: newport_*wait() return 0 on timeout
@ 2009-02-09 21:44 Roel Kluin
  0 siblings, 0 replies; 6+ messages in thread
From: Roel Kluin @ 2009-02-09 21:44 UTC (permalink / raw)
  To: adaplas, Andrew Morton; +Cc: linux-fbdev-devel

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;


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com

^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH] newport: newport_*wait() return 0 on timeout
@ 2009-01-31 15:29 Roel Kluin
  2009-02-02 12:08 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 6+ messages in thread
From: Roel Kluin @ 2009-01-31 15:29 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: video4linux-list, linux-media

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;

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-02-09 23:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-09 21:44 [PATCH] newport: newport_*wait() return 0 on timeout Roel Kluin
  -- strict thread matches above, loose matches on Subject: below --
2009-01-31 15:29 Roel Kluin
2009-02-02 12:08 ` 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

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.