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

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

diff -u --recursive --new-file v2.1.96/linux/drivers/sbus/char/pcikbd.c linux/drivers/sbus/char/pcikbd.c
@@ -1,4 +1,4 @@
-/* $Id: pcikbd.c,v 1.12 1997/12/27 16:28:27 jj Exp $
+/* $Id: pcikbd.c,v 1.16 1998/04/01 04:12:40 davem Exp $
  * pcikbd.c: Ultra/AX PC keyboard support.
  *
  * Copyright (C) 1997  Eddie C. Dost  (ecd@skynet.be)
@@ -953,14 +953,18 @@
 		return -ENODEV;
 
 	len = prom_getproperty(node, "keyboard", prop, sizeof(prop));
-	if (len > 0)
-		kbnode = prom_pathtoinode(prop);
+	if (len > 0) {
+		prop[len] = 0;
+		kbnode = prom_finddevice(prop);
+	}
 	if (!kbnode)
 		return -ENODEV;
 
 	len = prom_getproperty(node, "mouse", prop, sizeof(prop));
-	if (len > 0)
-		msnode = prom_pathtoinode(prop);
+	if (len > 0) {
+		prop[len] = 0;
+		msnode = prom_finddevice(prop);
+	}
 	if (!msnode)
 		return -ENODEV;
 
@@ -969,6 +973,15 @@
 	 */
         node = prom_getchild(prom_root_node);
 	pnode = prom_searchsiblings(node, "pci");
+
+	/*
+	 * Check for SUNW,sabre on Ultra5/10/AXi.
+	 */
+	len = prom_getproperty(pnode, "model", prop, sizeof(prop));
+	if ((len > 0) && !strncmp(prop, "SUNW,sabre", len)) {
+		pnode = prom_getchild(pnode);
+		pnode = prom_searchsiblings(pnode, "pci");
+	}
 
 	/*
 	 * For each PCI bus...

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov