/* get_node_path fills in @path with the firmware path to the device. Note that if @node is a parisc device, we don't fill in the 'mod' field. This is because both callers pass the parent and fill in the mod themselves. If @node is a PCI device, we do fill it in, even though this is inconsistent.  */
static void get_node_path(struct device *dev, struct hardware_path *path)
/* get_node_path fills in @path with the firmware path to the device. Note that if @node is a parisc device, we don't fill in the 'mod' field. This is because both callers pass the parent and fill in the mod themselves. If @node is a PCI device, we do fill it in, even though this is inconsistent.  */
static void get_node_path(struct device *dev, struct hardware_path *path)
{
	int i = 5;
	memset(&path->bc, -1, 6);
	if (is_pci_dev(dev)) {
		unsigned int devfn = to_pci_dev(dev)->devfn;
		path->mod = PCI_FUNC(devfn);
		path->bc[i--] = PCI_SLOT(devfn);
		dev = dev->parent;
	}
	while (dev != &root) {
		if (is_pci_dev(dev)) {
			unsigned int devfn = to_pci_dev(dev)->devfn;
			path->bc[i--] = PCI_SLOT(devfn) | (PCI_FUNC(devfn)<< 5);
		} else if (dev->bus == &parisc_bus_type) {
			path->bc[i--] = to_parisc_device(dev)->hw_path;
		}
		dev = dev->parent;
	}
}