patch-2.3.43 linux/drivers/sbus/char/pcikbd.c

Next file: linux/drivers/sbus/char/rtc.c
Previous file: linux/drivers/sbus/char/openprom.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.42/linux/drivers/sbus/char/pcikbd.c linux/drivers/sbus/char/pcikbd.c
@@ -1,4 +1,4 @@
-/* $Id: pcikbd.c,v 1.41 2000/01/08 07:01:20 davem Exp $
+/* $Id: pcikbd.c,v 1.43 2000/02/09 22:33:25 davem Exp $
  * pcikbd.c: Ultra/AX PC keyboard support.
  *
  * Copyright (C) 1997  Eddie C. Dost  (ecd@skynet.be)
@@ -21,6 +21,7 @@
 #include <linux/random.h>
 #include <linux/miscdevice.h>
 #include <linux/kbd_ll.h>
+#include <linux/kbd_kern.h>
 #include <linux/delay.h>
 #include <linux/init.h>
 
@@ -325,7 +326,7 @@
 			handle_scancode(scancode, !(scancode & 0x80));
 		status = pcikbd_inb(pcikbd_iobase + KBD_STATUS_REG);
 	} while(status & KBD_STAT_OBF);
-	mark_bh(KEYBOARD_BH);
+	tasklet_schedule(&keyboard_tasklet);
 }
 
 static int send_data(unsigned char data)
@@ -713,12 +714,13 @@
 static inline void aux_start_atomic(void)
 {
 	down(&aux_sema4);
-	disable_bh(KEYBOARD_BH);
+	tasklet_disable_nosync(&keyboard_tasklet);
+	tasklet_unlock_wait(&keyboard_tasklet);
 }
 
 static inline void aux_end_atomic(void)
 {
-	enable_bh(KEYBOARD_BH);
+	tasklet_enable(&keyboard_tasklet);
 	up(&aux_sema4);
 }
 
@@ -889,18 +891,12 @@
 }
 
 struct file_operations psaux_fops = {
-	NULL,		/* seek */
-	aux_read,
-	aux_write,
-	NULL, 		/* readdir */
-	aux_poll,
-	NULL, 		/* ioctl */
-	NULL,		/* mmap */
-	aux_open,
-	NULL,		/* flush */
-	aux_release,
-	NULL,
-	aux_fasync,
+	read:		aux_read,
+	write:		aux_write,
+	poll:		aux_poll,
+	open:		aux_open,
+	release:	aux_release,
+	fasync:		aux_fasync,
 };
 
 static int aux_no_open(struct inode *inode, struct file *file)
@@ -909,14 +905,7 @@
 }
 
 struct file_operations psaux_no_fops = {
-	NULL,		/* seek */
-	NULL,
-	NULL,
-	NULL, 		/* readdir */
-	NULL,
-	NULL, 		/* ioctl */
-	NULL,		/* mmap */
-	aux_no_open,
+	open:		aux_no_open,
 };
 
 static struct miscdevice psaux_mouse = {
@@ -1035,6 +1024,9 @@
 		goto found;
 	}
 #endif
+	if (!pci_present())
+		goto do_enodev;
+
 	/*
 	 * Get the nodes for keyboard and mouse from aliases on normal systems.
 	 */

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