-device_init(virtconsole_register)
-
-static VirtIOSerialPortInfo virtserialport_info = {
- .qdev.name = "virtserialport",
- .qdev.size = sizeof(VirtConsole),
- .init = virtconsole_initfn,
- .exit = virtconsole_exitfn,
- .qdev.props = (Property[]) {
- DEFINE_PROP_CHR("chardev", VirtConsole, chr),
- DEFINE_PROP_END_OF_LIST(),
- },
+
+static TypeInfo virtserialport_info = {
+ .name = "virtserialport",
+ .parent = TYPE_VIRTIO_SERIAL_PORT,
+ .instance_size = sizeof(VirtConsole),
+ .class_init = virtserialport_class_init,