mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
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>
This commit is contained in:
parent
3e80f6902c
commit
df70796916
16 changed files with 48 additions and 49 deletions
|
@ -1127,7 +1127,7 @@ SerialMM *serial_mm_init(MemoryRegion *address_space,
|
|||
qemu_irq irq, int baudbase,
|
||||
Chardev *chr, enum device_endian end)
|
||||
{
|
||||
SerialMM *smm = SERIAL_MM(qdev_create(NULL, TYPE_SERIAL_MM));
|
||||
SerialMM *smm = SERIAL_MM(qdev_new(TYPE_SERIAL_MM));
|
||||
MemoryRegion *mr;
|
||||
|
||||
qdev_prop_set_uint8(DEVICE(smm), "regshift", regshift);
|
||||
|
@ -1135,7 +1135,7 @@ SerialMM *serial_mm_init(MemoryRegion *address_space,
|
|||
qdev_prop_set_chr(DEVICE(smm), "chardev", chr);
|
||||
qdev_set_legacy_instance_id(DEVICE(smm), base, 2);
|
||||
qdev_prop_set_uint8(DEVICE(smm), "endianness", end);
|
||||
qdev_init_nofail(DEVICE(smm));
|
||||
qdev_realize_and_unref(DEVICE(smm), NULL, &error_fatal);
|
||||
|
||||
sysbus_connect_irq(SYS_BUS_DEVICE(smm), 0, irq);
|
||||
mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(smm), 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue