diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-12-04 11:52:49 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-27 10:50:47 -0600 |
commit | 8f04ee0882aec9fe91fb70f767edf5dacff59835 (patch) | |
tree | 01ebc9678569233858c2343c9cb04e62c2df55ad /hw/i82374.c | |
parent | e855761ca8fa08ebe29c1e69abc6f0863a453f92 (diff) |
isa: pic: convert to QEMU Object Model
This converts two devices at once because PIC subclasses ISA and converting
subclasses independently is extremely hard.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/i82374.c')
-rw-r--r-- | hw/i82374.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/hw/i82374.c b/hw/i82374.c index 616d1fc662..2814379237 100644 --- a/hw/i82374.c +++ b/hw/i82374.c @@ -135,12 +135,19 @@ static int i82374_isa_init(ISADevice *dev) return 0; } -static ISADeviceInfo i82374_isa_info = { - .qdev.name = "i82374", - .qdev.size = sizeof(ISAi82374State), - .qdev.vmsd = &vmstate_isa_i82374, - .init = i82374_isa_init, - .qdev.props = (Property[]) { +static void i82374_class_init(ObjectClass *klass, void *data) +{ + ISADeviceClass *k = ISA_DEVICE_CLASS(klass); + + k->init = i82374_isa_init; +} + +static DeviceInfo i82374_isa_info = { + .name = "i82374", + .size = sizeof(ISAi82374State), + .vmsd = &vmstate_isa_i82374, + .class_init = i82374_class_init, + .props = (Property[]) { DEFINE_PROP_HEX32("iobase", ISAi82374State, iobase, 0x400), DEFINE_PROP_END_OF_LIST() }, |