diff options
author | Willy Tarreau <w@1wt.eu> | 2008-09-07 17:54:31 +0200 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2008-09-07 17:54:31 +0200 |
commit | 0b29139ad4a8751246c57a4b0e4045973c1ae047 (patch) | |
tree | 1cf7077fe4f4fa6d269fc206d33e8f51e73cd2db | |
parent | 7f3abb1813d6275f82335369254bb5eecc346510 (diff) | |
download | linux-2.4-0b29139ad4a8751246c57a4b0e4045973c1ae047.tar.gz |
pc_keyb: fix breakage on ia64/mips/mips64
Commit f8db8c9c81afb4b04c146cae0e2a1fd311de1f22 fixed the keyboard
controller jammed issue on keyboard-less PCs, but introduced the
problem for other architectures (ia64/mips/mips64) which already
define their own keyboard probing method.
This patch gives precedence to these archs' probing method and only
defines the setup option if no arch-specific method was defined.
Signed-off-by: Willy Tarreau <w@1wt.eu>
-rw-r--r-- | drivers/char/pc_keyb.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/char/pc_keyb.c b/drivers/char/pc_keyb.c index d4e161129a17ce..b90e6592bd3f1f 100644 --- a/drivers/char/pc_keyb.c +++ b/drivers/char/pc_keyb.c @@ -61,6 +61,10 @@ unsigned char pckbd_sysrq_xlate[128] = "\r\000/"; /* 0x60 - 0x6f */ #endif +/* Warning: do not redefine kbd_controller_present on ia64, mips and mips64 */ +#ifndef kbd_controller_present +#define kbd_controller_present() keyboard_controller_present + int keyboard_controller_present __initdata = 1; static int __init removable_keyb(char *str) { @@ -68,6 +72,7 @@ static int __init removable_keyb(char *str) return 0; } __setup("nokeyb", removable_keyb); +#endif static void kbd_write_command_w(int data); static void kbd_write_output_w(int data); @@ -77,8 +82,6 @@ static void __aux_write_ack(int val); static int aux_reconnect = 0; #endif -#define kbd_controller_present() keyboard_controller_present - static spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED; static unsigned char handle_kbd_event(void); @@ -905,7 +908,7 @@ static char * __init initialize_kbd(void) void __init pckbd_init_hw(void) { - if (!keyboard_controller_present) { + if (!kbd_controller_present()) { kbd_exists = 0; return; } |