Skip to content

Commit

Permalink
Input: mainstone-wm97xx - fix condition in pen_up
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and Dmitry Torokhov committed Apr 15, 2009
1 parent 9a03fbe commit 180deb5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/input/touchscreen/mainstone-wm97xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 180deb5

Please sign in to comment.