patch-2.3.43 linux/drivers/char/pc_keyb.c

Next file: linux/drivers/char/pcwd.c
Previous file: linux/drivers/char/pc110pad.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.42/linux/drivers/char/pc_keyb.c linux/drivers/char/pc_keyb.c
@@ -30,6 +30,7 @@
 #include <linux/poll.h>
 #include <linux/miscdevice.h>
 #include <linux/malloc.h>
+#include <linux/kbd_kern.h>
 
 #include <asm/keyboard.h>
 #include <asm/bitops.h>
@@ -412,16 +413,13 @@
 #endif
 }
 
-static unsigned char kbd_exists = 1;
-
 static inline void handle_keyboard_event(unsigned char scancode)
 {
-	kbd_exists = 1;
 #ifdef CONFIG_VT
 	if (do_acknowledge(scancode))
 		handle_scancode(scancode, !(scancode & 0x80));
 #endif				
-	mark_bh(KEYBOARD_BH);
+	tasklet_schedule(&keyboard_tasklet);
 }	
 
 /*
@@ -485,8 +483,6 @@
 {
 	int retries = 3;
 
-	if (!kbd_exists) return 0;
-
 	do {
 		unsigned long timeout = KBD_TIMEOUT;
 
@@ -504,7 +500,6 @@
 #ifdef KBD_REPORT_TIMEOUTS
 				printk(KERN_WARNING "keyboard: Timeout - AT keyboard not present?\n");
 #endif
-				kbd_exists = 0;
 				return 0;
 			}
 		}
@@ -512,7 +507,6 @@
 #ifdef KBD_REPORT_TIMEOUTS
 	printk(KERN_WARNING "keyboard: Too many NACKs -- noisy kbd cable?\n");
 #endif
-	kbd_exists = 0;
 	return 0;
 }
 
@@ -971,18 +965,12 @@
 }
 
 struct file_operations psaux_fops = {
-	NULL,		/* seek */
-	read_aux,
-	write_aux,
-	NULL, 		/* readdir */
-	aux_poll,
-	NULL, 		/* ioctl */
-	NULL,		/* mmap */
-	open_aux,
-	NULL,		/* flush */
-	release_aux,
-	NULL,
-	fasync_aux,
+	read:		read_aux,
+	write:		write_aux,
+	poll:		aux_poll,
+	open:		open_aux,
+	release:	release_aux,
+	fasync:		fasync_aux,
 };
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)