diff options
| author | Roel Kluin <roel.kluin@gmail.com> | 2009-02-01 19:54:19 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-02-01 19:58:07 -0500 |
| commit | bc34496d63ec0a669d6825ea42275fd6fcbe9969 (patch) | |
| tree | f2035768ce6f8e307add8da626a5f629f2034545 /drivers/input | |
| parent | 4e8718a1f960db0c48427f4583f89f4cb62f2480 (diff) | |
Input: pxa930_trkball - fix write timeout handling
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>
Diffstat (limited to 'drivers/input')
| -rw-r--r-- | drivers/input/mouse/pxa930_trkball.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/pxa930_trkball.c b/drivers/input/mouse/pxa930_trkball.c index a0f45c4fc198..784be69b7112 100644 --- a/drivers/input/mouse/pxa930_trkball.c +++ b/drivers/input/mouse/pxa930_trkball.c | |||
| @@ -83,7 +83,7 @@ static int write_tbcr(struct pxa930_trkball *trkball, int v) | |||
| 83 | 83 | ||
| 84 | __raw_writel(v, trkball->mmio_base + TBCR); | 84 | __raw_writel(v, trkball->mmio_base + TBCR); |
| 85 | 85 | ||
| 86 | while (i--) { | 86 | while (--i) { |
| 87 | if (__raw_readl(trkball->mmio_base + TBCR) == v) | 87 | if (__raw_readl(trkball->mmio_base + TBCR) == v) |
| 88 | break; | 88 | break; |
| 89 | msleep(1); | 89 | msleep(1); |
