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>
This commit is contained in:
parent
7c9dcd6cab
commit
616bbde342
@ -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)
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user