aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc4xx_pci.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/ppc4xx_pci.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/ppc4xx_pci.c')
-rw-r--r--hw/ppc4xx_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/ppc4xx_pci.c b/hw/ppc4xx_pci.c
index 599a75a05b..55833213e1 100644
--- a/hw/ppc4xx_pci.c
+++ b/hw/ppc4xx_pci.c
@@ -338,7 +338,7 @@ static int ppc4xx_pcihost_initfn(SysBusDevice *dev)
PCIBus *b;
int i;
- h = FROM_SYSBUS(PCIHostState, dev);
+ h = PCI_HOST_BRIDGE(dev);
s = PPC4xx_PCI_HOST_BRIDGE(dev);
for (i = 0; i < ARRAY_SIZE(s->irq); i++) {
@@ -398,7 +398,7 @@ static void ppc4xx_pcihost_class_init(ObjectClass *klass, void *data)
static const TypeInfo ppc4xx_pcihost_info = {
.name = TYPE_PPC4xx_PCI_HOST_BRIDGE,
- .parent = TYPE_SYS_BUS_DEVICE,
+ .parent = TYPE_PCI_HOST_BRIDGE,
.instance_size = sizeof(PPC4xxPCIState),
.class_init = ppc4xx_pcihost_class_init,
};