Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Roel Kluin and committed by
Dmitry Torokhov
bc34496d 4e8718a1

+1 -1
+1 -1
drivers/input/mouse/pxa930_trkball.c
··· 83 83 84 84 __raw_writel(v, trkball->mmio_base + TBCR); 85 85 86 - while (i--) { 86 + while (--i) { 87 87 if (__raw_readl(trkball->mmio_base + TBCR) == v) 88 88 break; 89 89 msleep(1);