Index: arch/parisc/kernel/drivers.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/drivers.c,v
retrieving revision 1.36
diff -u -p -r1.36 drivers.c
--- arch/parisc/kernel/drivers.c	2002/01/07 23:45:58	1.36
+++ arch/parisc/kernel/drivers.c	2002/01/26 19:35:01
@@ -204,7 +204,11 @@ get_node_path(struct parisc_device *dev,
 	}
 }
 
-void print_hwpath(struct parisc_device *dev, char *output)
+/* print_hwpath - Returns hardware path for PA devices
+ * dev: The device to return the path for
+ * output: Pointer to a previously-allocated array to place the path in.
+ */
+char *print_hwpath(struct parisc_device *dev, char *output)
 {
 	int i;
 	struct hardware_path path;
Index: arch/parisc/kernel/pci.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/pci.c,v
retrieving revision 1.32
diff -u -p -r1.32 pci.c
--- arch/parisc/kernel/pci.c	2001/12/26 21:55:00	1.32
+++ arch/parisc/kernel/pci.c	2002/01/26 19:35:01
@@ -509,4 +495,27 @@ void pcibios_register_hba(struct pci_hba
 	/* pci_port->in/out() uses parisc_pci_hba to lookup parameter. */
 	parisc_pci_hba[pci_hba_count] = hba;
 	hba->hba_num = pci_hba_count++;
+}
+
+/* pci_hwpath - Returns hardware path for PCI devices
+ *
+ */
+void pci_hwpath(struct pci_dev *dev, char *path)
+{
+	int i = 0;
+	unsigned char pci_path[6];
+	struct pci_bus *root;
+
+	pci_path[i++] = PCI_FUNC(dev->devfn);
+	pci_path[i++] = PCI_SLOT(dev->devfn);
+	for (root = dev->bus; root->parent; root = root->parent) {
+		pci_path[i++] = root->number;
+		if (i == 6)
+			break;
+	}
+
+	path = print_hwpath(HBA_DATA(root->sysdata)->dev, path);
+	while (i > 0) {
+		path += sprintf (path, "/%d", pci_path[--i]);
+	}
 }
Index: drivers/video/sti/sticore.c
===================================================================
RCS file: /var/cvs/linux/drivers/video/sti/sticore.c,v
retrieving revision 1.31
diff -u -p -r1.31 sticore.c
--- drivers/video/sti/sticore.c	2002/01/07 23:49:10	1.31
+++ drivers/video/sti/sticore.c	2002/01/26 19:35:05
@@ -950,22 +959,8 @@ static int __devinit sticore_pci_init(st
 	default:
 		sti = sti_try_rom_generic(rom_base, fb_base, pd);
 		if (sti) {
-			unsigned char pci_path[4];
-			char pa_path[21];
-			struct pci_bus *root;
-			int i = 0;
-			char *p;
-			
-			pci_path[i++] = PCI_FUNC(pd->devfn);
-			pci_path[i++] = PCI_SLOT(pd->devfn);
-			for (root = pd->bus; root->parent && i < 4; root = root->parent)
-				pci_path[i++] = root->number;
-			if (i >= 4)
-				break; /* too many bridges, shouldn't happen */
-			print_hwpath (HBA_DATA(root->sysdata)->dev, pa_path);
-			p = &pa_path[strlen(pa_path)];
-			while (i > 0)
-				p += sprintf (p, "/%d", pci_path[--i]);
+			char pa_path[30];
+			pci_hwpath(pd, pa_path);
 			sticore_check_for_default_sti(sti, pa_path);
 		}
 		break;
@@ -1062,4 +1057,3 @@ struct sti_struct * __init sti_get_rom(i
 	}
 	return sti_roms[i];
 }
-   
Index: include/asm-parisc/hardware.h
===================================================================
RCS file: /var/cvs/linux/include/asm-parisc/hardware.h,v
retrieving revision 1.31
diff -u -p -r1.31 hardware.h
--- include/asm-parisc/hardware.h	2001/11/17 02:07:46	1.31
+++ include/asm-parisc/hardware.h	2002/01/26 19:35:06
@@ -144,6 +144,7 @@ extern void fixup_child_irqs(struct pari
 		int (*choose)(struct parisc_device *parent));
 extern void print_subdevices(struct parisc_device *dev);
 extern void print_parisc_devices(void);
+extern char *print_hwpath(struct parisc_device *dev, char *path);
 
 /* inventory.c: */
 extern void do_memory_inventory(void);
Index: include/asm-parisc/pci.h
===================================================================
RCS file: /var/cvs/linux/include/asm-parisc/pci.h,v
retrieving revision 1.41
diff -u -p -r1.41 pci.h
--- include/asm-parisc/pci.h	2002/01/15 06:02:57	1.41
+++ include/asm-parisc/pci.h	2002/01/26 19:35:07
@@ -243,6 +243,8 @@ extern inline void pcibios_register_hba(
 /* Return the index of the PCI controller for device PDEV. */
 #define pci_controller_num(PDEV)	(0)
 
+void pci_hwpath(struct pci_dev *dev, char *path);
+
 #define GET_IOC(dev) ((struct ioc *)(HBA_DATA(dev->sysdata)->iommu))
 
 #ifdef CONFIG_IOMMU_CCIO
