diff options
author | Markus Armbruster <armbru@redhat.com> | 2020-06-10 07:31:59 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-06-15 22:05:08 +0200 |
commit | df70796916ebbafe262a01c1c4dc6d7af805de24 (patch) | |
tree | 67c5b6e80f36502d9e653f4ae826b9304d1d95de /hw/display/ati.c | |
parent | 3e80f6902c13f6edb6675c0f33edcbbf0163ec32 (diff) | |
download | 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/display/ati.c')
-rw-r--r-- | hw/display/ati.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/display/ati.c b/hw/display/ati.c index 1d9df92b96..7216f7e08f 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -933,10 +933,9 @@ static void ati_vga_realize(PCIDevice *dev, Error **errp) /* ddc, edid */ I2CBus *i2cbus = i2c_init_bus(DEVICE(s), "ati-vga.ddc"); bitbang_i2c_init(&s->bbi2c, i2cbus); - I2CSlave *i2cddc = I2C_SLAVE(qdev_create(BUS(i2cbus), TYPE_I2CDDC)); + I2CSlave *i2cddc = I2C_SLAVE(qdev_new(TYPE_I2CDDC)); i2c_set_slave_address(i2cddc, 0x50); - object_property_set_bool(OBJECT(i2cddc), true, "realized", - &error_abort); + qdev_realize_and_unref(DEVICE(i2cddc), BUS(i2cbus), &error_abort); /* mmio register space */ memory_region_init_io(&s->mm, OBJECT(s), &ati_mm_ops, s, |