diff options
author | Igor Mammedov <imammedo@redhat.com> | 2022-11-29 11:13:41 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2022-12-21 07:32:24 -0500 |
commit | ad4942746cb428f649f854e1d13622a745f603a5 (patch) | |
tree | 91c81e1c931d68186f6152c9782e445417286195 /include | |
parent | b1fbf24259188717e8b52eecaf8ca66da3e6ac58 (diff) |
pci: drop redundant PCIDeviceClass::is_bridge field
and use cast to TYPE_PCI_BRIDGE instead.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221129101341.185621-3-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/pci/pci.h | 10 | ||||
-rw-r--r-- | include/hw/pci/pci_bridge.h | 1 |
2 files changed, 2 insertions, 9 deletions
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 06e2d5f889..954f260f84 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -251,15 +251,7 @@ struct PCIDeviceClass { uint16_t subsystem_vendor_id; /* only for header type = 0 */ uint16_t subsystem_id; /* only for header type = 0 */ - /* - * pci-to-pci bridge or normal device. - * This doesn't mean pci host switch. - * When card bus bridge is supported, this would be enhanced. - */ - bool is_bridge; - - /* rom bar */ - const char *romfile; + const char *romfile; /* rom bar */ }; typedef void (*PCIINTxRoutingNotifier)(PCIDevice *dev); diff --git a/include/hw/pci/pci_bridge.h b/include/hw/pci/pci_bridge.h index ba4bafac7c..ca6caf487e 100644 --- a/include/hw/pci/pci_bridge.h +++ b/include/hw/pci/pci_bridge.h @@ -53,6 +53,7 @@ struct PCIBridgeWindows { #define TYPE_PCI_BRIDGE "base-pci-bridge" OBJECT_DECLARE_SIMPLE_TYPE(PCIBridge, PCI_BRIDGE) +#define IS_PCI_BRIDGE(dev) object_dynamic_cast(OBJECT(dev), TYPE_PCI_BRIDGE) struct PCIBridge { /*< private >*/ |