aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2011-01-27 15:56:38 +0900
committerMichael S. Tsirkin <mst@redhat.com>2011-03-28 18:34:22 +0200
commit6ff534b678e26450ad6e2ad850b70c9db0e92139 (patch)
tree43d6496cef67617aca54ebed9e771c212c54dd5d
parent5256d8bfad9b0113dc2f9b57706eaad26b008987 (diff)
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>
-rw-r--r--hw/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci.c b/hw/pci.c
index 44a1f9e526..df184f1829 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -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);
}