u-boot/drivers/input
Gabe Black 22e0f5a9ec x86: Fix some bugs in the i8402 driver when no controller is present
If no controller is present, the i8402 driver should return immediately and
not attempt to operate on the missing hardware.

In kbd_input_empty, the status register is checked every millisecond to see
whether the input buffer is empty, up to a timeout which is tracked by
decrimenting a counter each time the check is performed. The decrement is
performed with a postfix -- operator, and the value of the counter is
checked in place. That means that when the counter reaches zero and the
loop terminates, it will actually be decrimented one more time and become
-1. That value is returned as the return value of the function. That would
give the right answer if it wasn't for that extra decrement because a
timeout would indicate that the buffer never became empty.

This change fixes both of those bugs.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
2011-11-29 21:31:35 +11:00
..
Makefile Switch from archive libraries to partial linking 2010-11-17 21:02:18 +01:00
i8042.c x86: Fix some bugs in the i8402 driver when no controller is present 2011-11-29 21:31:35 +11:00
keyboard.c License cleanup: remove unintended "All Rights Reserved" notices. 2009-09-04 23:00:56 +02:00
pc_keyb.c License cleanup: remove unintended "All Rights Reserved" notices. 2009-09-04 23:00:56 +02:00
ps2mult.c License cleanup: remove unintended "All Rights Reserved" notices. 2009-09-04 23:00:56 +02:00
ps2ser.c Remove HMI10 board support 2010-09-19 21:28:25 +02:00