summaryrefslogtreecommitdiff
path: root/drivers/input/i8042.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/i8042.c')
-rw-r--r--drivers/input/i8042.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c
index c3bc536..6839c6b 100644
--- a/drivers/input/i8042.c
+++ b/drivers/input/i8042.c
@@ -607,11 +607,10 @@ static void kbd_led_set(void)
static int kbd_input_empty(void)
{
- int kbdTimeout = KBD_TIMEOUT;
+ int kbdTimeout = KBD_TIMEOUT * 1000;
- /* wait for input buf empty */
- while ((in8(I8042_STATUS_REG) & 0x02) && kbdTimeout--)
- udelay(1000);
+ while ((in8(I8042_STATUS_REG) & I8042_STATUS_IN_DATA) && kbdTimeout--)
+ udelay(1);
return kbdTimeout != -1;
}
@@ -625,8 +624,6 @@ static int kbd_reset(void)
out8(I8042_DATA_REG, 0xff);
- udelay(250000);
-
if (kbd_input_empty() == 0)
return -1;