pci: Reuse pci-bridge hotplug handler handlers for pcie-pci-bridge
commit62b765639691de36476c471117e96184a2a3c7a6
authorDavid Hildenbrand <david@redhat.com>
Wed, 12 Dec 2018 09:16:21 +0000 (12 10:16 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 20 Dec 2018 16:19:12 +0000 (20 11:19 -0500)
tree7d3b5b76895d9c571e3000cd2bdf9c0b686a43ca
parenta1952d01e731856f5a9654508d6c9658796e40f7
pci: Reuse pci-bridge hotplug handler handlers for pcie-pci-bridge

These functions are essentially the same, we only have to use
object_get_typename() for reporting errors. So let's share the
implementation of hotplug handler callbacks.

Suggested-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-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>
hw/pci-bridge/pci_bridge_dev.c
hw/pci-bridge/pcie_pci_bridge.c
include/hw/pci/pci_bridge.h