aboutsummaryrefslogtreecommitdiff
path: root/hw/display/xlnx_dp.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/display/xlnx_dp.c')
-rw-r--r--hw/display/xlnx_dp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c
index 5210412e55..6e9793584a 100644
--- a/hw/display/xlnx_dp.c
+++ b/hw/display/xlnx_dp.c
@@ -1252,7 +1252,7 @@ static void xlnx_dp_init(Object *obj)
s->dpcd = DPCD(aux_create_slave(s->aux_bus, "dpcd"));
object_property_add_child(OBJECT(s), "dpcd", OBJECT(s->dpcd));
- s->edid = I2CDDC(qdev_create(BUS(aux_get_i2c_bus(s->aux_bus)), "i2c-ddc"));
+ s->edid = I2CDDC(qdev_new("i2c-ddc"));
i2c_set_slave_address(I2C_SLAVE(s->edid), 0x50);
object_property_add_child(OBJECT(s), "edid", OBJECT(s->edid));
@@ -1271,7 +1271,8 @@ static void xlnx_dp_realize(DeviceState *dev, Error **errp)
qdev_init_nofail(DEVICE(s->dpcd));
aux_map_slave(AUX_SLAVE(s->dpcd), 0x0000);
- qdev_init_nofail(DEVICE(s->edid));
+ qdev_realize_and_unref(DEVICE(s->edid), BUS(aux_get_i2c_bus(s->aux_bus)),
+ &error_fatal);
s->console = graphic_console_init(dev, 0, &xlnx_dp_gfx_ops, s);
surface = qemu_console_surface(s->console);