Thread (3 messages) 3 messages, 3 authors, 2009-04-15
STALE6253d

[PATCH 1/1] INPUT: mainstone-wm97xx, fix condition in pen_up

From: Jiri Slaby <hidden>
Date: 2009-04-15 06:44:20
Also in: lkml
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers: Dmitry Torokhov, Linus Torvalds

The loop body was never executed, because the condition is
always false. Convert to for with more obvious condition.

Signed-off-by: Jiri Slaby <redacted>
Cc: Mark Brown <redacted>
Cc: Liam Girdwood <redacted>
---
 drivers/input/touchscreen/mainstone-wm97xx.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/input/touchscreen/mainstone-wm97xx.c b/drivers/input/touchscreen/mainstone-wm97xx.c
index dfa6a84..4cc047a 100644
--- a/drivers/input/touchscreen/mainstone-wm97xx.c
+++ b/drivers/input/touchscreen/mainstone-wm97xx.c
@@ -111,13 +111,12 @@ static void wm97xx_acc_pen_up(struct wm97xx *wm)
 #else
 static void wm97xx_acc_pen_up(struct wm97xx *wm)
 {
-	int count = 16;
+	unsigned int count;
+
 	schedule_timeout_uninterruptible(1);
 
-	while (count < 16) {
+	for (count = 0; count < 16; count++)
 		MODR;
-		count--;
-	}
 }
 #endif
 
-- 
1.6.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help