pci: Eliminate pci_find_primary_bus()
commite492dc5a267e2236b93b8b7192fedd840ef34dc9
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 29 Nov 2017 08:46:28 +0000 (29 19:46 +1100)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 5 Dec 2017 17:13:45 +0000 (5 19:13 +0200)
tree30fc923126d53e8f09753fd9322723975955ec4c
parentfd56e0612b6454a282fa6a953fdb09281a98c589
pci: Eliminate pci_find_primary_bus()

pci_find_primary_bus() only has one user, in pc_xen_hvm_init().  That's
inside the machine construction code, so it already has easy access to the
machine's primary PCI bus.

Get it directly, and thereby remove pci_find_primary_bus().  This removes
one of only a handful of users of the ugly pci_host_bridges global.

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/i386/pc_piix.c
hw/pci/pci.c
include/hw/pci/pci.h