aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-06-10 07:32:01 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-06-15 22:05:28 +0200
commit68424112284f1553e886f3db7ddada7d8ddcbb6a (patch)
tree91b1d99eed5e10f01b740adc6ab8f71e609ab530 /hw/ppc
parent99ba777e53ebf31bf24e7a52a21fccdd25f95537 (diff)
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/ppc')
-rw-r--r--hw/ppc/pnv.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 8562af3fe0..e0588285a2 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -1212,12 +1212,11 @@ static void pnv_chip_power8_realize(DeviceState *dev, Error **errp)
object_property_set_int(OBJECT(phb), i, "index", &error_fatal);
object_property_set_int(OBJECT(phb), chip->chip_id, "chip-id",
&error_fatal);
- object_property_set_bool(OBJECT(phb), true, "realized", &local_err);
+ qdev_realize(DEVICE(phb), NULL, &local_err);
if (local_err) {
error_propagate(errp, local_err);
return;
}
- qdev_set_parent_bus(DEVICE(phb), sysbus_get_default());
/* Populate the XSCOM address space. */
pnv_xscom_add_subregion(chip,
@@ -1422,12 +1421,11 @@ static void pnv_chip_power9_phb_realize(PnvChip *chip, Error **errp)
object_property_set_int(obj, PNV_PHB4_DEVICE_ID, "device-id",
&error_fatal);
object_property_set_link(obj, OBJECT(stack), "stack", &error_abort);
- object_property_set_bool(obj, true, "realized", &local_err);
+ qdev_realize(DEVICE(obj), NULL, &local_err);
if (local_err) {
error_propagate(errp, local_err);
return;
}
- qdev_set_parent_bus(DEVICE(obj), sysbus_get_default());
/* Populate the XSCOM address space. */
pnv_xscom_add_subregion(chip,