mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
isa: Use realizefn for ISADevice
Drop ISADeviceClass::init and the resulting no-op initfn and let children implement their own realizefn. Adapt error handling. Split off an instance_init where sensible. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
a3dcca567a
commit
db895a1e6a
34 changed files with 292 additions and 243 deletions
|
@ -119,18 +119,6 @@ void isa_register_portio_list(ISADevice *dev, uint16_t start,
|
|||
portio_list_add(piolist, isabus->address_space_io, start);
|
||||
}
|
||||
|
||||
static int isa_qdev_init(DeviceState *qdev)
|
||||
{
|
||||
ISADevice *dev = ISA_DEVICE(qdev);
|
||||
ISADeviceClass *klass = ISA_DEVICE_GET_CLASS(dev);
|
||||
|
||||
if (klass->init) {
|
||||
return klass->init(dev);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void isa_device_init(Object *obj)
|
||||
{
|
||||
ISADevice *dev = ISA_DEVICE(obj);
|
||||
|
@ -230,7 +218,6 @@ static const TypeInfo isabus_bridge_info = {
|
|||
static void isa_device_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
DeviceClass *k = DEVICE_CLASS(klass);
|
||||
k->init = isa_qdev_init;
|
||||
k->bus_type = TYPE_ISA_BUS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue