aboutsummaryrefslogtreecommitdiff
path: root/hw/block/xen-block.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/block/xen-block.c
parent3e80f6902c13f6edb6675c0f33edcbbf0163ec32 (diff)
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/block/xen-block.c')
-rw-r--r--hw/block/xen-block.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
index 570489d6d9..2827c90ac7 100644
--- a/hw/block/xen-block.c
+++ b/hw/block/xen-block.c
@@ -937,7 +937,7 @@ static void xen_block_device_create(XenBackendInstance *backend,
goto fail;
}
- xendev = XEN_DEVICE(qdev_create(BUS(xenbus), type));
+ xendev = XEN_DEVICE(qdev_new(type));
blockdev = XEN_BLOCK_DEVICE(xendev);
object_property_set_str(OBJECT(xendev), vdev, "vdev", &local_err);
@@ -965,7 +965,7 @@ static void xen_block_device_create(XenBackendInstance *backend,
blockdev->iothread = iothread;
blockdev->drive = drive;
- object_property_set_bool(OBJECT(xendev), true, "realized", &local_err);
+ qdev_realize_and_unref(DEVICE(xendev), BUS(xenbus), &local_err);
if (local_err) {
error_propagate_prepend(errp, local_err,
"realization of device %s failed: ",