/* Flush all buffer from keyboard controller to host  */
static void i8042_flush(void)
/* Flush all buffer from keyboard controller to host  */
static void i8042_flush(void)
{
	int timeout;
	while (1) {
		timeout = 100;
		while (timeout > 0 && !(in8(I8042_STS_REG) & STATUS_OBF)) {
			udelay(1);
			timeout--;
		}
		if (in8(I8042_STS_REG) & STATUS_OBF)
			in8(I8042_DATA_REG);
		else
			break;
	}
}