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/vga-isa.c | |
parent | e855761ca8fa08ebe29c1e69abc6f0863a453f92 (diff) | |
download | qemu-8f04ee0882aec9fe91fb70f767edf5dacff59835.zip qemu-8f04ee0882aec9fe91fb70f767edf5dacff59835.tar.gz qemu-8f04ee0882aec9fe91fb70f767edf5dacff59835.tar.bz2 |
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/vga-isa.c')
-rw-r--r-- | hw/vga-isa.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/hw/vga-isa.c b/hw/vga-isa.c index 4825313..cb6af91 100644 --- a/hw/vga-isa.c +++ b/hw/vga-isa.c @@ -69,12 +69,18 @@ static int vga_initfn(ISADevice *dev) return 0; } -static ISADeviceInfo vga_info = { - .qdev.name = "isa-vga", - .qdev.size = sizeof(ISAVGAState), - .qdev.vmsd = &vmstate_vga_common, - .qdev.reset = vga_reset_isa, - .init = vga_initfn, +static void vga_class_initfn(ObjectClass *klass, void *data) +{ + ISADeviceClass *ic = ISA_DEVICE_CLASS(klass); + ic->init = vga_initfn; +} + +static DeviceInfo vga_info = { + .name = "isa-vga", + .size = sizeof(ISAVGAState), + .vmsd = &vmstate_vga_common, + .reset = vga_reset_isa, + .class_init = vga_class_initfn, }; static void vga_register(void) |