Преглед на файлове

Input: mainstone-wm97xx - fix condition in pen_up

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

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Jiri Slaby преди 16 години
родител
ревизия
180deb5088
променени са 1 файла, в които са добавени 3 реда и са изтрити 4 реда
  1. 3 4
      drivers/input/touchscreen/mainstone-wm97xx.c

+ 3 - 4
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