]> git.baikalelectronics.ru Git - kernel.git/commit
Input: i8042 - i8042_flush fix for a full 8042 buffer
authorAndrey Moiseev <o2g.org.ru@gmail.com>
Mon, 16 Sep 2013 22:17:31 +0000 (15:17 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 18 Sep 2013 19:22:06 +0000 (12:22 -0700)
commit8bdd44599e7d2ca4f87f7ed7af4f997be08c2159
tree8bde47595130fca3526efb343e2f3a2ed9b6901c
parenta74b3dbd37151fe9aabceaee38e1d81b516b1e79
Input: i8042 - i8042_flush fix for a full 8042 buffer

When 8042 internal data buffer is full, the driver
erroneously decides that the controller is not present.

i8042_flush returns the number of flushed bytes, which is
in 0 - I8042_BUFFER_SIZE range inclusive. Therefore, i8042_flush
has no way to indicate an error. Moreover i8042_controller_check
takes initially full buffer (i8042_flush returned
I8042_BUFFER_SIZE) as a sign of absence of the controller.

Let's change i8042 to return success/error instead and make sure
we do not return error prematurely.

Signed-off-by: Andrey Moiseev <o2g.org.ru@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/serio/i8042.c