diff options
author | Markus Armbruster | 2020-06-10 07:31:59 +0200 |
---|---|---|
committer | Markus Armbruster | 2020-06-15 22:05:08 +0200 |
commit | df70796916ebbafe262a01c1c4dc6d7af805de24 (patch) | |
tree | 67c5b6e80f36502d9e653f4ae826b9304d1d95de /hw/i386/pc.c | |
parent | qdev: Convert uses of qdev_create() with Coccinelle (diff) | |
download | qemu-df70796916ebbafe262a01c1c4dc6d7af805de24.tar.gz qemu-df70796916ebbafe262a01c1c4dc6d7af805de24.tar.xz 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/i386/pc.c')
-rw-r--r-- | hw/i386/pc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index a5dd6252fa..ab2380c01f 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1205,7 +1205,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi, * when the HPET wants to take over. Thus we have to disable the latter. */ if (!no_hpet && (!kvm_irqchip_in_kernel() || kvm_has_pit_state2())) { - hpet = qdev_try_create(NULL, TYPE_HPET); + hpet = qdev_try_new(TYPE_HPET); if (hpet) { /* For pc-piix-*, hpet's intcap is always IRQ2. For pc-q35-1.7 * and earlier, use IRQ2 for compat. Otherwise, use IRQ16~23, @@ -1216,7 +1216,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi, if (!compat) { qdev_prop_set_uint32(hpet, HPET_INTCAP, hpet_irqs); } - qdev_init_nofail(hpet); + qdev_realize_and_unref(hpet, NULL, &error_fatal); sysbus_mmio_map(SYS_BUS_DEVICE(hpet), 0, HPET_BASE); for (i = 0; i < GSI_NUM_PINS; i++) { |