diff options
author | Andreas Färber <afaerber@suse.de> | 2013-07-11 17:13:43 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-07-29 20:44:47 +0200 |
commit | f055e96bd4311d287c0e03faec02a1bdbc351925 (patch) | |
tree | b2fd16ffacacbb26c7da89f171ffc027da4d8c39 /hw/pci-host/apb.c | |
parent | 45c0a675f9572f236b4be881576de9a626d2618f (diff) | |
download | hqemu-f055e96bd4311d287c0e03faec02a1bdbc351925.zip hqemu-f055e96bd4311d287c0e03faec02a1bdbc351925.tar.gz |
pci-bridge: Turn PCIBridge into abstract QOM type
Introduce TYPE_PCI_BRIDGE as base type and use PCI_BRIDGE() casts.
Reviewed-by: Don Koch <dkoch@verizon.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
[AF: Updated pbm-bridge parent to TYPE_PCI_BRIDGE]
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/pci-host/apb.c')
-rw-r--r-- | hw/pci-host/apb.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/pci-host/apb.c b/hw/pci-host/apb.c index bef7be1..92f289f 100644 --- a/hw/pci-host/apb.c +++ b/hw/pci-host/apb.c @@ -423,7 +423,7 @@ PCIBus *pci_apb_init(hwaddr special_base, /* APB secondary busses */ pci_dev = pci_create_multifunction(phb->bus, PCI_DEVFN(1, 0), true, "pbm-bridge"); - br = DO_UPCAST(PCIBridge, dev, pci_dev); + br = PCI_BRIDGE(pci_dev); pci_bridge_map_irq(br, "Advanced PCI Bus secondary bridge 1", pci_apb_map_irq); qdev_init_nofail(&pci_dev->qdev); @@ -431,7 +431,7 @@ PCIBus *pci_apb_init(hwaddr special_base, pci_dev = pci_create_multifunction(phb->bus, PCI_DEVFN(1, 1), true, "pbm-bridge"); - br = DO_UPCAST(PCIBridge, dev, pci_dev); + br = PCI_BRIDGE(pci_dev); pci_bridge_map_irq(br, "Advanced PCI Bus secondary bridge 2", pci_apb_map_irq); qdev_init_nofail(&pci_dev->qdev); @@ -566,8 +566,7 @@ static void pbm_pci_bridge_class_init(ObjectClass *klass, void *data) static const TypeInfo pbm_pci_bridge_info = { .name = "pbm-bridge", - .parent = TYPE_PCI_DEVICE, - .instance_size = sizeof(PCIBridge), + .parent = TYPE_PCI_BRIDGE, .class_init = pbm_pci_bridge_class_init, }; |