projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc34496
)
Input: ambakmi - fix timeout handling in amba_kmi_write()
author
Roel Kluin
<roel.kluin@gmail.com>
Mon, 2 Feb 2009 00:55:45 +0000
(16:55 -0800)
committer
Dmitry Torokhov
<dmitry.torokhov@gmail.com>
Mon, 2 Feb 2009 00:58:18 +0000
(16:58 -0800)
With a postfix decrement timeleft reaches -1 rather than 0,
but after the loop it is tested to have become 0.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/serio/ambakmi.c
patch
|
blob
|
history
diff --git
a/drivers/input/serio/ambakmi.c
b/drivers/input/serio/ambakmi.c
index af159c7d60bcdb6c526589915b1f615cdc89b649..e29cdc13a199c007ab8ac6c6337086fe3685c5c4 100644
(file)
--- a/
drivers/input/serio/ambakmi.c
+++ b/
drivers/input/serio/ambakmi.c
@@
-57,7
+57,7
@@
static int amba_kmi_write(struct serio *io, unsigned char val)
struct amba_kmi_port *kmi = io->port_data;
unsigned int timeleft = 10000; /* timeout in 100ms */
- while ((readb(KMISTAT) & KMISTAT_TXEMPTY) == 0 &&
timeleft--
)
+ while ((readb(KMISTAT) & KMISTAT_TXEMPTY) == 0 &&
--timeleft
)
udelay(10);
if (timeleft)