/* This is an internal function for use by the other search functions in this file.  */
static struct pci_dev* pci_get_dev_by_id(const struct pci_device_id *id, struct pci_dev *from)
/* This is an internal function for use by the other search functions in this file.  */
static struct pci_dev* pci_get_dev_by_id(const struct pci_device_id *id, struct pci_dev *from)
{
	struct device *dev;
	struct device *dev_start = NULL;
	struct pci_dev *pdev = NULL;
	WARN_ON(in_interrupt());
	if (from)
		dev_start = &from->dev;
	dev = bus_find_device(&pci_bus_type, dev_start, (void *)id,
			      match_pci_dev_by_id);
	if (dev)
		pdev = to_pci_dev(dev);
	if (from)
		pci_dev_put(from);
	return pdev;
}