summary refs log tree commit diff stats
path: root/hw/ppc/pnv.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-06-10 07:31:59 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-06-15 22:05:08 +0200
commitdf70796916ebbafe262a01c1c4dc6d7af805de24 (patch)
tree67c5b6e80f36502d9e653f4ae826b9304d1d95de /hw/ppc/pnv.c
parent3e80f6902c13f6edb6675c0f33edcbbf0163ec32 (diff)
downloadfocaccia-qemu-df70796916ebbafe262a01c1c4dc6d7af805de24.tar.gz
focaccia-qemu-df70796916ebbafe262a01c1c4dc6d7af805de24.zip
qdev: Convert uses of qdev_create() 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: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200610053247.1583243-11-armbru@redhat.com>
Diffstat (limited to 'hw/ppc/pnv.c')
-rw-r--r--hw/ppc/pnv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index e3b6f0b884..8562af3fe0 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -818,7 +818,7 @@ static void pnv_init(MachineState *machine)
     pnv->chips = g_new0(PnvChip *, pnv->num_chips);
     for (i = 0; i < pnv->num_chips; i++) {
         char chip_name[32];
-        Object *chip = OBJECT(qdev_create(NULL, chip_typename));
+        Object *chip = OBJECT(qdev_new(chip_typename));
 
         pnv->chips[i] = PNV_CHIP(chip);
 
@@ -850,7 +850,7 @@ static void pnv_init(MachineState *machine)
             object_property_set_link(chip, OBJECT(pnv), "xive-fabric",
                                      &error_abort);
         }
-        object_property_set_bool(chip, true, "realized", &error_fatal);
+        qdev_realize_and_unref(DEVICE(chip), NULL, &error_fatal);
     }
     g_free(chip_typename);