@@ -39,8 +39,8 @@ static void virtio_gpu_pci_base_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
}
for (i = 0; i < g->conf.max_outputs; i++) {
- object_property_set_link(OBJECT(g->scanout[i].con), "device",
- OBJECT(vpci_dev), &error_abort);
+ qdev_prop_set_link(DEVICE(g->scanout[i].con), "device",
+ OBJECT(vpci_dev));
}
}
@@ -160,8 +160,8 @@ static void virtio_vga_base_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
graphic_console_set_hwops(vga->con, &virtio_vga_base_ops, vvga);
for (i = 0; i < g->conf.max_outputs; i++) {
- object_property_set_link(OBJECT(g->scanout[i].con), "device",
- OBJECT(vpci_dev), &error_abort);
+ qdev_prop_set_link(DEVICE(g->scanout[i].con), "device",
+ OBJECT(vpci_dev));
}
}
@@ -67,8 +67,7 @@ static void virtio_iommu_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
return;
}
- object_property_set_link(OBJECT(dev), "primary-bus",
- OBJECT(pbus), &error_abort);
+ qdev_prop_set_link(DEVICE(dev), "primary-bus", OBJECT(pbus));
virtio_pci_force_virtio_1(vpci_dev);
qdev_realize(vdev, BUS(&vpci_dev->bus), errp);
@@ -205,8 +205,7 @@ static void virtio_rng_device_realize(DeviceState *dev, Error **errp)
/* The child property took a reference, we can safely drop ours now */
object_unref(default_backend);
- object_property_set_link(OBJECT(dev), "rng", default_backend,
- &error_abort);
+ qdev_prop_set_link(dev, "rng", default_backend);
}
vrng->rng = vrng->conf.rng;
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/display/virtio-gpu-pci.c | 4 ++-- hw/display/virtio-vga.c | 4 ++-- hw/virtio/virtio-iommu-pci.c | 3 +-- hw/virtio/virtio-rng.c | 3 +-- 4 files changed, 6 insertions(+), 8 deletions(-)