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-bridge/dec.c | |
parent | 45c0a675f9572f236b4be881576de9a626d2618f (diff) |
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-bridge/dec.c')
-rw-r--r-- | hw/pci-bridge/dec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/pci-bridge/dec.c b/hw/pci-bridge/dec.c index efc07c42bd..e5e3be829f 100644 --- a/hw/pci-bridge/dec.c +++ b/hw/pci-bridge/dec.c @@ -74,7 +74,7 @@ static void dec_21154_pci_bridge_class_init(ObjectClass *klass, void *data) static const TypeInfo dec_21154_pci_bridge_info = { .name = "dec-21154-p2p-bridge", - .parent = TYPE_PCI_DEVICE, + .parent = TYPE_PCI_BRIDGE, .instance_size = sizeof(PCIBridge), .class_init = dec_21154_pci_bridge_class_init, }; @@ -86,7 +86,7 @@ PCIBus *pci_dec_21154_init(PCIBus *parent_bus, int devfn) dev = pci_create_multifunction(parent_bus, devfn, false, "dec-21154-p2p-bridge"); - br = DO_UPCAST(PCIBridge, dev, dev); + br = PCI_BRIDGE(dev); pci_bridge_map_irq(br, "DEC 21154 PCI-PCI bridge", dec_map_irq); qdev_init_nofail(&dev->qdev); return pci_bridge_get_sec_bus(br); |