diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-08-25 15:20:13 -0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-08-27 14:04:54 -0400 |
commit | 616bbde34293226e5c957761982ebaf1eff69d90 (patch) | |
tree | 2843fffd2ba74136753e9334a0d03bc60dd4553c | |
parent | 7c9dcd6cabfa96ea2a89dd12041f3e63aa20a09c (diff) | |
download | qemu-616bbde34293226e5c957761982ebaf1eff69d90.zip qemu-616bbde34293226e5c957761982ebaf1eff69d90.tar.gz qemu-616bbde34293226e5c957761982ebaf1eff69d90.tar.bz2 |
pci: Move PCIBusClass typedef to pci.h
Move typedef closer to the type check macros, to make it easier
to convert the code to OBJECT_DEFINE_TYPE() in the future.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com>
Message-Id: <20200825192110.3528606-18-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
-rw-r--r-- | include/hw/pci/pci.h | 1 | ||||
-rw-r--r-- | include/hw/pci/pci_bus.h | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index c1bf7d5..4ca7258 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -396,6 +396,7 @@ typedef int (*pci_map_irq_fn)(PCIDevice *pci_dev, int irq_num); typedef PCIINTxRoute (*pci_route_irq_fn)(void *opaque, int pin); #define TYPE_PCI_BUS "PCI" +typedef struct PCIBusClass PCIBusClass; #define PCI_BUS(obj) OBJECT_CHECK(PCIBus, (obj), TYPE_PCI_BUS) #define PCI_BUS_CLASS(klass) OBJECT_CLASS_CHECK(PCIBusClass, (klass), TYPE_PCI_BUS) #define PCI_BUS_GET_CLASS(obj) OBJECT_GET_CLASS(PCIBusClass, (obj), TYPE_PCI_BUS) diff --git a/include/hw/pci/pci_bus.h b/include/hw/pci/pci_bus.h index 0714f57..347440d 100644 --- a/include/hw/pci/pci_bus.h +++ b/include/hw/pci/pci_bus.h @@ -10,14 +10,14 @@ * use accessor functions in pci.h */ -typedef struct PCIBusClass { +struct PCIBusClass { /*< private >*/ BusClass parent_class; /*< public >*/ int (*bus_num)(PCIBus *bus); uint16_t (*numa_node)(PCIBus *bus); -} PCIBusClass; +}; enum PCIBusFlags { /* This bus is the root of a PCI domain */ |