/* Used by a driver to check whether a  */
static const struct pci_device_id* pci_match_device(struct pci_driver *drv, struct pci_dev *dev)
/* Used by a driver to check whether a  */
static const struct pci_device_id* pci_match_device(struct pci_driver *drv, struct pci_dev *dev)
{
	struct pci_dynid *dynid;
	spin_lock(&drv->dynids.lock);
	list_for_each_entry(dynid, &drv->dynids.list, node) {
		if (pci_match_one_device(&dynid->id, dev)) {
			spin_unlock(&drv->dynids.lock);
			return &dynid->id;
		}
	}
	spin_unlock(&drv->dynids.lock);
	return pci_match_id(drv->id_table, dev);
}