diff options
author | Andreas Färber <afaerber@suse.de> | 2012-08-20 19:08:08 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-08-22 10:47:17 -0500 |
commit | 8558d942b665a9ff0847851615e107308f6386a5 (patch) | |
tree | e7686af2dc1fd9bc80b8a67baebd2b232347c2ce /hw/prep_pci.c | |
parent | b44ff9d430c5f2b51872f542d9562a15f0061a82 (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/prep_pci.c')
-rw-r--r-- | hw/prep_pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/prep_pci.c b/hw/prep_pci.c index 69c19dfded..35cb9b297c 100644 --- a/hw/prep_pci.c +++ b/hw/prep_pci.c @@ -103,7 +103,7 @@ static void prep_set_irq(void *opaque, int irq_num, int level) static int raven_pcihost_init(SysBusDevice *dev) { - PCIHostState *h = FROM_SYSBUS(PCIHostState, dev); + PCIHostState *h = PCI_HOST_BRIDGE(dev); PREPPCIState *s = RAVEN_PCI_HOST_BRIDGE(dev); MemoryRegion *address_space_mem = get_system_memory(); MemoryRegion *address_space_io = get_system_io(); @@ -192,7 +192,7 @@ static void raven_pcihost_class_init(ObjectClass *klass, void *data) static const TypeInfo raven_pcihost_info = { .name = TYPE_RAVEN_PCI_HOST_BRIDGE, - .parent = TYPE_SYS_BUS_DEVICE, + .parent = TYPE_PCI_HOST_BRIDGE, .instance_size = sizeof(PREPPCIState), .class_init = raven_pcihost_class_init, }; |