[PATCH] pckeyb legacy free option vs kbd_controller_present() ( Yet Another Patch)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There is already some patches for this feature (see http://lkml.org/lkml/2002/12/4/162)
This one has the benefit of not being "CONFIG" time, but rather "BOOT" time using  pc_keyb=off.



--- /usr/src/linux-2.4.32/drivers/char/pc_keyb.c	Thu Nov 28 18:53:12 2002
+++ /usr/src/linux-2.4.32-82571ACPI/drivers/char/pc_keyb.c	Wed Jun 21 16:01:42 2006
@@ -13,6 +13,8 @@
  * Code fixes to handle mouse ACKs properly.
  * C. Scott Ananian <[email protected]> 1999-01-29.
  *
+ * Added pc_keyb setup option to avoid boot delays on legacy free PCs
+ * Francois Isabelle <[email protected]> 2006-06-21
  */
 
 #include <linux/config.h>
@@ -48,6 +50,11 @@
 
 #include <linux/pc_keyb.h>
 
+unsigned int pc_keyb_probe=1; 
+
+static int __devinit pc_keyb_setup(char *str);
+
+
 /* Simple translation table for the SysRq keys */
 
 #ifdef CONFIG_MAGIC_SYSRQ
@@ -801,6 +810,18 @@
 }
 #endif /* CONFIG_PSMOUSE */
 
+
+static int __devinit pc_keyb_setup(char *str)
+{
+	if (!strcmp(str, "off")) {
+		pc_keyb_probe = 0;
+		return 0;
+	}
+	return 1;
+}
+
+__setup("pc_keyb=", pc_keyb_setup);
+
 static char * __init initialize_kbd(void)
 {
 	int status;
@@ -898,6 +919,11 @@
 
 void __init pckbd_init_hw(void)
 {
+	if(!pc_keyb_probe ){
+		kbd_exists = 0;
+		return;
+	}
+
 	if (!kbd_controller_present()) {
 		kbd_exists = 0;
 		return;

Francois Isabelle

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux