summaryrefslogtreecommitdiffstats
path: root/hw/pci-host/prep.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/pci-host/prep.c')
-rw-r--r--hw/pci-host/prep.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
index 88e2fc66a9..367e408b91 100644
--- a/hw/pci-host/prep.c
+++ b/hw/pci-host/prep.c
@@ -238,8 +238,7 @@ static void raven_pcihost_realizefn(DeviceState *d, Error **errp)
s->or_irq = OR_IRQ(object_new(TYPE_OR_IRQ));
object_property_set_int(OBJECT(s->or_irq), PCI_NUM_PINS, "num-lines",
&error_fatal);
- object_property_set_bool(OBJECT(s->or_irq), true, "realized",
- &error_fatal);
+ qdev_realize(DEVICE(s->or_irq), NULL, &error_fatal);
sysbus_init_irq(dev, &s->or_irq->out_irq);
for (i = 0; i < PCI_NUM_PINS; i++) {
@@ -268,8 +267,7 @@ static void raven_pcihost_realizefn(DeviceState *d, Error **errp)
memory_region_add_subregion(address_space_mem, 0xbffffff0, &s->pci_intack);
/* TODO Remove once realize propagates to child devices. */
- object_property_set_bool(OBJECT(&s->pci_bus), true, "realized", errp);
- object_property_set_bool(OBJECT(&s->pci_dev), true, "realized", errp);
+ qdev_realize(DEVICE(&s->pci_dev), BUS(&s->pci_bus), errp);
}
static void raven_pcihost_initfn(Object *obj)
@@ -309,7 +307,6 @@ static void raven_pcihost_initfn(Object *obj)
object_initialize(&s->pci_dev, sizeof(s->pci_dev), TYPE_RAVEN_PCI_DEVICE);
pci_dev = DEVICE(&s->pci_dev);
- qdev_set_parent_bus(pci_dev, BUS(&s->pci_bus));
object_property_set_int(OBJECT(&s->pci_dev), PCI_DEVFN(0, 0), "addr",
NULL);
qdev_prop_set_bit(pci_dev, "multifunction", false);