Skip to content

Commit

Permalink
Input: pxa930_trkball - fix write timeout handling
Browse files Browse the repository at this point in the history
With a postfix decrement i reaches -1 rather than 0,
but after the loop it is tested whether it has become 0.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Roel Kluin authored and Dmitry Torokhov committed Feb 2, 2009
1 parent 4e8718a commit bc34496
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/mouse/pxa930_trkball.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static int write_tbcr(struct pxa930_trkball *trkball, int v)

__raw_writel(v, trkball->mmio_base + TBCR);

while (i--) {
while (--i) {
if (__raw_readl(trkball->mmio_base + TBCR) == v)
break;
msleep(1);
Expand Down

0 comments on commit bc34496

Please sign in to comment.