/* match_pci_device - Matches a pci device against a given hardware path entry. @dev: the generic device (known to be contained by a pci_dev). @index: the current BC index @modpath: the hardware path.  */
static int match_pci_device(struct device *dev, int index, struct hardware_path *modpath)
/* match_pci_device - Matches a pci device against a given hardware path entry. @dev: the generic device (known to be contained by a pci_dev). @index: the current BC index @modpath: the hardware path.  */
static int match_pci_device(struct device *dev, int index, struct hardware_path *modpath)
{
	struct pci_dev *pdev = to_pci_dev(dev);
	int id;
	if (index == 5) {
		unsigned int devfn = pdev->devfn;
		return ((modpath->bc[5] == PCI_SLOT(devfn)) &&
					(modpath->mod == PCI_FUNC(devfn)));
	}
	id = PCI_SLOT(pdev->devfn) | (PCI_FUNC(pdev->devfn) << 5);
	return (modpath->bc[index] == id);
}