From: Jiri Slaby Date: Wed, 15 Apr 2009 16:03:07 +0000 (-0700) Subject: Input: mainstone-wm97xx - fix condition in pen_up X-Git-Tag: v3.12-rc1~13364^2~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=180deb50880cdc5e9dd69ec97af0d6e72c5417fc;p=kernel%2Fkernel-generic.git 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 Acked-by: Mark Brown Signed-off-by: Dmitry Torokhov --- 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