diff options
Diffstat (limited to 'hw/vmport.c')
-rw-r--r-- | hw/vmport.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/hw/vmport.c b/hw/vmport.c index 0a3dbc5ef5..a2c45e1950 100644 --- a/hw/vmport.c +++ b/hw/vmport.c @@ -144,15 +144,23 @@ 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) +{ + DeviceClass *dc = DEVICE_CLASS(klass); + ISADeviceClass *ic = ISA_DEVICE_CLASS(klass); + ic->init = vmport_initfn; + dc->no_user = 1; +} + +static TypeInfo vmport_info = { + .name = "vmport", + .parent = TYPE_ISA_DEVICE, + .instance_size = sizeof(VMPortState), + .class_init = vmport_class_initfn, }; static void vmport_dev_register(void) { - isa_qdev_register(&vmport_info); + type_register_static(&vmport_info); } device_init(vmport_dev_register) |