pci: use PCI_DEVFN in pci_get_bus_devfn()

Replace hardcoded logic by a common macro.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Isaku Yamahata 2011-01-27 15:56:38 +09:00 committed by Michael S. Tsirkin
parent 5256d8bfad
commit 6ff534b678
1 changed files with 1 additions and 1 deletions

View File

@ -558,7 +558,7 @@ PCIBus *pci_get_bus_devfn(int *devfnp, const char *devaddr)
return NULL;
}
*devfnp = slot << 3;
*devfnp = PCI_DEVFN(slot, 0);
return pci_find_bus(pci_find_root_bus(dom), bus);
}