]> git.proxmox.com Git - mirror_qemu.git/commit
pci: Add pci_dev_bus_num() helper
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 29 Nov 2017 08:46:26 +0000 (19:46 +1100)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 5 Dec 2017 17:13:45 +0000 (19:13 +0200)
commitcdc57472dcc2ddc440545bde26791a11b42232b6
treed34a294183491d58915f9004d2b5c058216dda06
parent791bf3c8f042219a111aab3d00cd09a139629b59
pci: Add pci_dev_bus_num() helper

A fair proportion of the users of pci_bus_num() want to get the bus
number on a specific device, so first have to look up the bus from the
device then call it.  This adds a helper to do that (since we're going
to make looking up the bus slightly more verbose).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
hw/pci/pcie_aer.c
hw/s390x/s390-pci-bus.c
hw/scsi/megasas.c
hw/scsi/mptsas.c
hw/xen/xen_pt.c
include/hw/pci/pci.h
include/hw/xen/xen_common.h