Commit 6ff534b6 authored by Isaku Yamahata's avatar Isaku Yamahata Committed by Michael S. Tsirkin
Browse files

pci: use PCI_DEVFN in pci_get_bus_devfn()



Replace hardcoded logic by a common macro.

Signed-off-by: default avatarIsaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 5256d8bf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}