summaryrefslogtreecommitdiffstats
path: root/hw/pci-host/prep.c
diff options
context:
space:
mode:
authorMarkus Armbruster2020-06-10 07:32:01 +0200
committerMarkus Armbruster2020-06-15 22:05:28 +0200
commit68424112284f1553e886f3db7ddada7d8ddcbb6a (patch)
tree91b1d99eed5e10f01b740adc6ab8f71e609ab530 /hw/pci-host/prep.c
parentqdev: Convert uses of qdev_set_parent_bus() with Coccinelle (diff)
downloadqemu-68424112284f1553e886f3db7ddada7d8ddcbb6a.tar.gz
qemu-68424112284f1553e886f3db7ddada7d8ddcbb6a.tar.xz
qemu-68424112284f1553e886f3db7ddada7d8ddcbb6a.zip
qdev: Convert uses of qdev_set_parent_bus() manually
Same transformation as in the previous commit. Manual, because convincing Coccinelle to transform these cases is somewhere between not worthwhile and infeasible (at least for me). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200610053247.1583243-13-armbru@redhat.com>
Diffstat (limited to 'hw/pci-host/prep.c')
-rw-r--r--hw/pci-host/prep.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
index fc01a294a4..a5550d1221 100644
--- a/hw/pci-host/prep.c
+++ b/hw/pci-host/prep.c
@@ -268,7 +268,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_dev), true, "realized", errp);
+ qdev_realize(DEVICE(&s->pci_dev), BUS(&s->pci_bus), errp);
}
static void raven_pcihost_initfn(Object *obj)
@@ -308,7 +308,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);