SOURCES: linux-2.4.31-nopckeyb.patch (NEW) - from http://linux.asi...

hunter hunter at pld-linux.org
Wed Jun 15 19:59:56 CEST 2005


Author: hunter                       Date: Wed Jun 15 17:59:56 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- from http://linux.asio.pl/files/nopckeyb/nopckeyb-2.4.31.patch

---- Files affected:
SOURCES:
   linux-2.4.31-nopckeyb.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/linux-2.4.31-nopckeyb.patch
diff -u /dev/null SOURCES/linux-2.4.31-nopckeyb.patch:1.1
--- /dev/null	Wed Jun 15 19:59:56 2005
+++ SOURCES/linux-2.4.31-nopckeyb.patch	Wed Jun 15 19:59:51 2005
@@ -0,0 +1,60 @@
+A small patch adding option "nopckeyb" to disable keyboard from
+kernel command line.
+Copyright (C) 2005 Stefan Szczygielski
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+
+diff -Naur linux-2.4.31/drivers/char/pc_keyb.c linux-2.4.31u/drivers/char/pc_keyb.c
+--- linux-2.4.31/drivers/char/pc_keyb.c	2002-11-29 00:53:12.000000000 +0100
++++ linux-2.4.31u/drivers/char/pc_keyb.c	2005-06-15 16:04:19.000000000 +0200
+@@ -102,6 +102,11 @@
+ #define MAX_RETRIES	60		/* some aux operations take long time*/
+ #endif /* CONFIG_PSMOUSE */
+ 
++/* Pass "nopckeyb" to the command line to disable keyboard. Required for some systems which
++   do not have one (eg. PC Engines WRAP). */
++
++int keyboard_disable = 0;
++
+ /*
+  * Wait for keyboard controller input buffer to drain.
+  *
+@@ -898,7 +903,7 @@
+ 
+ void __init pckbd_init_hw(void)
+ {
+-	if (!kbd_controller_present()) {
++	if (keyboard_disable || !kbd_controller_present()) {
+ 		kbd_exists = 0;
+ 		return;
+ 	}
+@@ -1259,7 +1264,17 @@
+     return 1;
+ }
+ 
++static int __init keyboard_disable_setup(char *str)
++{
++	printk(KERN_INFO "\"nopckeyb\" passed to the kernel, keyboard disabled.\n");
++	keyboard_disable=1;
++	return 0;
++}
++
+ /* panicblink=0 disables the blinking as it caused problems with some console
+    switches. otherwise argument is ms of a blink period. */
+ __setup("panicblink=", panicblink_setup);
+ 
++/* disable keyboard */
++
++__setup("nopckeyb", keyboard_disable_setup);
================================================================



More information about the pld-cvs-commit mailing list