]> Git Repo - qemu.git/commitdiff
pci: Move PCIBusClass typedef to pci.h
authorEduardo Habkost <[email protected]>
Tue, 25 Aug 2020 19:20:13 +0000 (15:20 -0400)
committerEduardo Habkost <[email protected]>
Thu, 27 Aug 2020 18:04:54 +0000 (14:04 -0400)
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Ă© <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
Tested-By: Roman Bolshakov <[email protected]>
Message-Id: <20200825192110.3528606[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
include/hw/pci/pci.h
include/hw/pci/pci_bus.h

index c1bf7d5356b7e925a782c8332df924ec12024713..4ca7258b5b71573f96d4b0c4ac806404d320945b 100644 (file)
@@ -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)
index 0714f578afe6c0e581223e0c0d01cb6b887859ff..347440d42ca19b3bffbc62126e60bc60c986c222 100644 (file)
  * 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 */
This page took 0.029005 seconds and 4 git commands to generate.