summaryrefslogtreecommitdiff
path: root/hw/vmport.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/vmport.c
parente855761ca8fa08ebe29c1e69abc6f0863a453f92 (diff)
downloadqemu-8f04ee0882aec9fe91fb70f767edf5dacff59835.tar.gz
qemu-8f04ee0882aec9fe91fb70f767edf5dacff59835.tar.bz2
qemu-8f04ee0882aec9fe91fb70f767edf5dacff59835.zip
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/vmport.c')
-rw-r--r--hw/vmport.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/hw/vmport.c b/hw/vmport.c
index 0a3dbc5ef5..c4582d6a00 100644
--- a/hw/vmport.c
+++ b/hw/vmport.c
@@ -144,11 +144,17 @@ static int vmport_initfn(ISADevice *dev)
return 0;
}
-static ISADeviceInfo vmport_info = {
- .qdev.name = "vmport",
- .qdev.size = sizeof(VMPortState),
- .qdev.no_user = 1,
- .init = vmport_initfn,
+static void vmport_class_initfn(ObjectClass *klass, void *data)
+{
+ ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
+ ic->init = vmport_initfn;
+}
+
+static DeviceInfo vmport_info = {
+ .name = "vmport",
+ .size = sizeof(VMPortState),
+ .no_user = 1,
+ .class_init = vmport_class_initfn,
};
static void vmport_dev_register(void)