Explorar o código

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>
Roel Kluin %!s(int64=16) %!d(string=hai) anos
pai
achega
bc34496d63
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/input/mouse/pxa930_trkball.c

+ 1 - 1
drivers/input/mouse/pxa930_trkball.c

@@ -83,7 +83,7 @@ static int write_tbcr(struct pxa930_trkball *trkball, int v)
 
 
 	__raw_writel(v, trkball->mmio_base + TBCR);
 	__raw_writel(v, trkball->mmio_base + TBCR);
 
 
-	while (i--) {
+	while (--i) {
 		if (__raw_readl(trkball->mmio_base + TBCR) == v)
 		if (__raw_readl(trkball->mmio_base + TBCR) == v)
 			break;
 			break;
 		msleep(1);
 		msleep(1);