diff options
Diffstat (limited to 'hw/grackle_pci.c')
-rw-r--r-- | hw/grackle_pci.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/grackle_pci.c b/hw/grackle_pci.c index d8142708a1..066f6e1900 100644 --- a/hw/grackle_pci.c +++ b/hw/grackle_pci.c @@ -73,7 +73,7 @@ PCIBus *pci_grackle_init(uint32_t base, qemu_irq *pic, dev = qdev_create(NULL, TYPE_GRACKLE_PCI_HOST_BRIDGE); qdev_init_nofail(dev); s = SYS_BUS_DEVICE(dev); - phb = FROM_SYSBUS(PCIHostState, s); + phb = PCI_HOST_BRIDGE(dev); d = GRACKLE_PCI_HOST_BRIDGE(dev); memory_region_init(&d->pci_mmio, "pci-mmio", 0x100000000ULL); @@ -102,7 +102,7 @@ static int pci_grackle_init_device(SysBusDevice *dev) { PCIHostState *phb; - phb = FROM_SYSBUS(PCIHostState, dev); + phb = PCI_HOST_BRIDGE(dev); memory_region_init_io(&phb->conf_mem, &pci_host_conf_le_ops, dev, "pci-conf-idx", 0x1000); @@ -151,7 +151,7 @@ static void pci_grackle_class_init(ObjectClass *klass, void *data) static const TypeInfo grackle_pci_host_info = { .name = TYPE_GRACKLE_PCI_HOST_BRIDGE, - .parent = TYPE_SYS_BUS_DEVICE, + .parent = TYPE_PCI_HOST_BRIDGE, .instance_size = sizeof(GrackleState), .class_init = pci_grackle_class_init, }; |