aboutsummaryrefslogtreecommitdiff
path: root/hw/cirrus_vga.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-12-04 11:52:49 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-01-27 10:50:47 -0600
commit8f04ee0882aec9fe91fb70f767edf5dacff59835 (patch)
tree01ebc9678569233858c2343c9cb04e62c2df55ad /hw/cirrus_vga.c
parente855761ca8fa08ebe29c1e69abc6f0863a453f92 (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/cirrus_vga.c')
-rw-r--r--hw/cirrus_vga.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index 5b22cc3fee..1d3689248a 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -2898,11 +2898,18 @@ static int vga_initfn(ISADevice *dev)
return 0;
}
-static ISADeviceInfo isa_cirrus_vga_info = {
- .qdev.name = "isa-cirrus-vga",
- .qdev.size = sizeof(ISACirrusVGAState),
- .qdev.vmsd = &vmstate_cirrus_vga,
- .init = vga_initfn,
+static void isa_cirrus_vga_class_init(ObjectClass *klass, void *data)
+{
+ ISADeviceClass *k = ISA_DEVICE_CLASS(klass);
+
+ k->init = vga_initfn;
+}
+
+static DeviceInfo isa_cirrus_vga_info = {
+ .name = "isa-cirrus-vga",
+ .size = sizeof(ISACirrusVGAState),
+ .vmsd = &vmstate_cirrus_vga,
+ .class_init = isa_cirrus_vga_class_init,
};
static void isa_cirrus_vga_register(void)