aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc_prep.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-08-20 19:08:08 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2012-08-22 10:47:17 -0500
commit8558d942b665a9ff0847851615e107308f6386a5 (patch)
treee7686af2dc1fd9bc80b8a67baebd2b232347c2ce /hw/ppc_prep.c
parentb44ff9d430c5f2b51872f542d9562a15f0061a82 (diff)
pci: Derive PCI host bridges from TYPE_PCI_HOST_BRIDGE
Use PCIHostState and PCI_HOST_BRIDGE() where appropriate. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/ppc_prep.c')
-rw-r--r--hw/ppc_prep.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index 7a876164c9..592b7b255f 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -471,7 +471,6 @@ static void ppc_prep_init (ram_addr_t ram_size,
uint32_t kernel_base, initrd_base;
long kernel_size, initrd_size;
DeviceState *dev;
- SysBusDevice *sys;
PCIHostState *pcihost;
PCIBus *pci_bus;
PCIDevice *pci;
@@ -584,8 +583,7 @@ static void ppc_prep_init (ram_addr_t ram_size,
}
dev = qdev_create(NULL, "raven-pcihost");
- sys = sysbus_from_qdev(dev);
- pcihost = DO_UPCAST(PCIHostState, busdev, sys);
+ pcihost = PCI_HOST_BRIDGE(dev);
pcihost->address_space = get_system_memory();
object_property_add_child(qdev_get_machine(), "raven", OBJECT(dev), NULL);
qdev_init_nofail(dev);