aboutsummaryrefslogtreecommitdiff
path: root/hw/vmmouse.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/vmmouse.c
parente855761ca8fa08ebe29c1e69abc6f0863a453f92 (diff)
downloadqemu-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/vmmouse.c')
-rw-r--r--hw/vmmouse.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/hw/vmmouse.c b/hw/vmmouse.c
index 1113f33..da2ea32 100644
--- a/hw/vmmouse.c
+++ b/hw/vmmouse.c
@@ -269,14 +269,20 @@ static int vmmouse_initfn(ISADevice *dev)
return 0;
}
-static ISADeviceInfo vmmouse_info = {
- .init = vmmouse_initfn,
- .qdev.name = "vmmouse",
- .qdev.size = sizeof(VMMouseState),
- .qdev.vmsd = &vmstate_vmmouse,
- .qdev.no_user = 1,
- .qdev.reset = vmmouse_reset,
- .qdev.props = (Property[]) {
+static void vmmouse_class_initfn(ObjectClass *klass, void *data)
+{
+ ISADeviceClass *ic = ISA_DEVICE_CLASS(klass);
+ ic->init = vmmouse_initfn;
+}
+
+static DeviceInfo vmmouse_info = {
+ .class_init = vmmouse_class_initfn,
+ .name = "vmmouse",
+ .size = sizeof(VMMouseState),
+ .vmsd = &vmstate_vmmouse,
+ .no_user = 1,
+ .reset = vmmouse_reset,
+ .props = (Property[]) {
DEFINE_PROP_PTR("ps2_mouse", VMMouseState, ps2_mouse),
DEFINE_PROP_END_OF_LIST(),
}