mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
isa: Convert uses of isa_create(), isa_try_create() manually
Same transformation as in the previous commit. Manual, because convincing Coccinelle to transform these cases is not worthwhile. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200610053247.1583243-21-armbru@redhat.com>
This commit is contained in:
parent
96927c744f
commit
c23e05614e
4 changed files with 11 additions and 11 deletions
|
@ -2544,7 +2544,7 @@ ISADevice *fdctrl_init_isa(ISABus *bus, DriveInfo **fds)
|
|||
DeviceState *dev;
|
||||
ISADevice *isadev;
|
||||
|
||||
isadev = isa_try_create(bus, TYPE_ISA_FDC);
|
||||
isadev = isa_try_new(TYPE_ISA_FDC);
|
||||
if (!isadev) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -2558,7 +2558,7 @@ ISADevice *fdctrl_init_isa(ISABus *bus, DriveInfo **fds)
|
|||
qdev_prop_set_drive(dev, "driveB", blk_by_legacy_dinfo(fds[1]),
|
||||
&error_fatal);
|
||||
}
|
||||
qdev_init_nofail(dev);
|
||||
isa_realize_and_unref(isadev, bus, &error_fatal);
|
||||
|
||||
return isadev;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue