summary refs log tree commit diff stats
path: root/hw/misc/macio/macio.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/misc/macio/macio.c')
-rw-r--r--hw/misc/macio/macio.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
index 53a9fd5696..216bdc69c0 100644
--- a/hw/misc/macio/macio.c
+++ b/hw/misc/macio/macio.c
@@ -356,9 +356,7 @@ static void macio_newworld_realize(PCIDevice *d, Error **errp)
         object_property_set_link(OBJECT(&s->pmu), OBJECT(sysbus_dev), "gpio",
                                  &error_abort);
         qdev_prop_set_bit(DEVICE(&s->pmu), "has-adb", ns->has_adb);
-        qdev_set_parent_bus(DEVICE(&s->pmu), BUS(&s->macio_bus));
-
-        object_property_set_bool(OBJECT(&s->pmu), true, "realized", &err);
+        qdev_realize(DEVICE(&s->pmu), BUS(&s->macio_bus), &err);
         if (err) {
             error_propagate(errp, err);
             return;
@@ -374,11 +372,10 @@ static void macio_newworld_realize(PCIDevice *d, Error **errp)
         /* CUDA */
         object_initialize_child(OBJECT(s), "cuda", &s->cuda, sizeof(s->cuda),
                                 TYPE_CUDA, &error_abort, NULL);
-        qdev_set_parent_bus(DEVICE(&s->cuda), BUS(&s->macio_bus));
         qdev_prop_set_uint64(DEVICE(&s->cuda), "timebase-frequency",
                              s->frequency);
 
-        object_property_set_bool(OBJECT(&s->cuda), true, "realized", &err);
+        qdev_realize(DEVICE(&s->cuda), BUS(&s->macio_bus), &err);
         if (err) {
             error_propagate(errp, err);
             return;