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/pckbd.c | |
parent | e855761ca8fa08ebe29c1e69abc6f0863a453f92 (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/pckbd.c')
-rw-r--r-- | hw/pckbd.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/hw/pckbd.c b/hw/pckbd.c index 06b40c540c..2ebe1c534c 100644 --- a/hw/pckbd.c +++ b/hw/pckbd.c @@ -497,12 +497,18 @@ static int i8042_initfn(ISADevice *dev) return 0; } -static ISADeviceInfo i8042_info = { - .qdev.name = "i8042", - .qdev.size = sizeof(ISAKBDState), - .qdev.vmsd = &vmstate_kbd_isa, - .qdev.no_user = 1, - .init = i8042_initfn, +static void i8042_class_initfn(ObjectClass *klass, void *data) +{ + ISADeviceClass *ic = ISA_DEVICE_CLASS(klass); + ic->init = i8042_initfn; +} + +static DeviceInfo i8042_info = { + .name = "i8042", + .size = sizeof(ISAKBDState), + .vmsd = &vmstate_kbd_isa, + .no_user = 1, + .class_init = i8042_class_initfn, }; static void i8042_register(void) |