summaryrefslogtreecommitdiffstats
path: root/hw/sga.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/sga.c
parente855761ca8fa08ebe29c1e69abc6f0863a453f92 (diff)
downloadhqemu-8f04ee0882aec9fe91fb70f767edf5dacff59835.zip
hqemu-8f04ee0882aec9fe91fb70f767edf5dacff59835.tar.gz
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/sga.c')
-rw-r--r--hw/sga.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/hw/sga.c b/hw/sga.c
index ea11937..d612cb6 100644
--- a/hw/sga.c
+++ b/hw/sga.c
@@ -40,12 +40,17 @@ static int sga_initfn(ISADevice *dev)
rom_add_vga(SGABIOS_FILENAME);
return 0;
}
+static void sga_class_initfn(ObjectClass *klass, void *data)
+{
+ ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
+ ic->init = sga_initfn;
+}
-static ISADeviceInfo sga_info = {
- .qdev.name = "sga",
- .qdev.desc = "Serial Graphics Adapter",
- .qdev.size = sizeof(ISASGAState),
- .init = sga_initfn,
+static DeviceInfo sga_info = {
+ .name = "sga",
+ .desc = "Serial Graphics Adapter",
+ .size = sizeof(ISASGAState),
+ .class_init = sga_class_initfn,
};
static void sga_register(void)
OpenPOWER on IntegriCloud