diff options
author | David Hildenbrand | 2018-12-12 10:16:21 +0100 |
---|---|---|
committer | Michael S. Tsirkin | 2018-12-20 17:19:12 +0100 |
commit | 62b765639691de36476c471117e96184a2a3c7a6 (patch) | |
tree | 7d3b5b76895d9c571e3000cd2bdf9c0b686a43ca /include/hw/pci/pci_bridge.h | |
parent | pci/pcie: perform unplug via the hotplug handler (diff) | |
download | qemu-62b765639691de36476c471117e96184a2a3c7a6.tar.gz qemu-62b765639691de36476c471117e96184a2a3c7a6.tar.xz qemu-62b765639691de36476c471117e96184a2a3c7a6.zip |
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>
Diffstat (limited to 'include/hw/pci/pci_bridge.h')
-rw-r--r-- | include/hw/pci/pci_bridge.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/pci/pci_bridge.h b/include/hw/pci/pci_bridge.h index cdff7edfd1..6e37c7551a 100644 --- a/include/hw/pci/pci_bridge.h +++ b/include/hw/pci/pci_bridge.h @@ -99,6 +99,10 @@ void pci_bridge_reset(DeviceState *qdev); void pci_bridge_initfn(PCIDevice *pci_dev, const char *typename); void pci_bridge_exitfn(PCIDevice *pci_dev); +void pci_bridge_dev_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, + Error **errp); +void pci_bridge_dev_unplug_request_cb(HotplugHandler *hotplug_dev, + DeviceState *dev, Error **errp); /* * before qdev initialization(qdev_init()), this function sets bus_name and |