mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 12:09:58 +00:00
isa: Split off instance_init for ISADevice
Prepares for assigning IRQs before QOM realize. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1361010446-1427-1-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
872536bf5d
commit
c538ca66ff
12
hw/isa-bus.c
12
hw/isa-bus.c
@ -124,9 +124,6 @@ static int isa_qdev_init(DeviceState *qdev)
|
||||
ISADevice *dev = ISA_DEVICE(qdev);
|
||||
ISADeviceClass *klass = ISA_DEVICE_GET_CLASS(dev);
|
||||
|
||||
dev->isairq[0] = -1;
|
||||
dev->isairq[1] = -1;
|
||||
|
||||
if (klass->init) {
|
||||
return klass->init(dev);
|
||||
}
|
||||
@ -134,6 +131,14 @@ static int isa_qdev_init(DeviceState *qdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void isa_device_init(Object *obj)
|
||||
{
|
||||
ISADevice *dev = ISA_DEVICE(obj);
|
||||
|
||||
dev->isairq[0] = -1;
|
||||
dev->isairq[1] = -1;
|
||||
}
|
||||
|
||||
ISADevice *isa_create(ISABus *bus, const char *name)
|
||||
{
|
||||
DeviceState *dev;
|
||||
@ -233,6 +238,7 @@ static const TypeInfo isa_device_type_info = {
|
||||
.name = TYPE_ISA_DEVICE,
|
||||
.parent = TYPE_DEVICE,
|
||||
.instance_size = sizeof(ISADevice),
|
||||
.instance_init = isa_device_init,
|
||||
.abstract = true,
|
||||
.class_size = sizeof(ISADeviceClass),
|
||||
.class_init = isa_device_class_init,
|
||||
|
Loading…
Reference in New Issue
Block a user