2.4.36-stable kernel tree
修订版 | 0c3a57b64ca84e262f1530d8a6a2d5596de34103 (tree) |
---|---|
时间 | 2008-09-22 13:31:45 |
作者 | Willy Tarreau <w@1wt....> |
Commiter | Willy Tarreau |
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>
@@ -61,6 +61,10 @@ unsigned char pckbd_sysrq_xlate[128] = | ||
61 | 61 | "\r\000/"; /* 0x60 - 0x6f */ |
62 | 62 | #endif |
63 | 63 | |
64 | +/* Warning: do not redefine kbd_controller_present on ia64, mips and mips64 */ | |
65 | +#ifndef kbd_controller_present | |
66 | +#define kbd_controller_present() keyboard_controller_present | |
67 | + | |
64 | 68 | int keyboard_controller_present __initdata = 1; |
65 | 69 | static int __init removable_keyb(char *str) |
66 | 70 | { |
@@ -68,6 +72,7 @@ static int __init removable_keyb(char *str) | ||
68 | 72 | return 0; |
69 | 73 | } |
70 | 74 | __setup("nokeyb", removable_keyb); |
75 | +#endif | |
71 | 76 | |
72 | 77 | static void kbd_write_command_w(int data); |
73 | 78 | static void kbd_write_output_w(int data); |
@@ -77,8 +82,6 @@ static void __aux_write_ack(int val); | ||
77 | 82 | static int aux_reconnect = 0; |
78 | 83 | #endif |
79 | 84 | |
80 | -#define kbd_controller_present() keyboard_controller_present | |
81 | - | |
82 | 85 | static spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED; |
83 | 86 | static unsigned char handle_kbd_event(void); |
84 | 87 |
@@ -905,7 +908,7 @@ static char * __init initialize_kbd(void) | ||
905 | 908 | |
906 | 909 | void __init pckbd_init_hw(void) |
907 | 910 | { |
908 | - if (!keyboard_controller_present) { | |
911 | + if (!kbd_controller_present()) { | |
909 | 912 | kbd_exists = 0; |
910 | 913 | return; |
911 | 914 | } |