/* Given an mmio phys address, or a port number, find a pci device that implements this address. Be sure to pci_dev_put the device when finished. I/O port numbers are assumed to be offset from zero (that is, they do  */
struct pci_dev* pci_get_device_by_addr(unsigned long addr)
/* Given an mmio phys address, or a port number, find a pci device that implements this address. Be sure to pci_dev_put the device when finished. I/O port numbers are assumed to be offset from zero (that is, they do  */
struct pci_dev* pci_get_device_by_addr(unsigned long addr)
{
	struct pci_dev *dev;
	unsigned long flags;
	spin_lock_irqsave(&pci_io_addr_cache_root.piar_lock, flags);
	dev = __pci_get_device_by_addr(addr);
	spin_unlock_irqrestore(&pci_io_addr_cache_root.piar_lock, flags);
	return dev;
}