summary refs log tree commit diff stats
path: root/hw/escc.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/escc.c')
-rw-r--r--hw/escc.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/hw/escc.c b/hw/escc.c
index d905d96978..9fe282f7b8 100644
--- a/hw/escc.c
+++ b/hw/escc.c
@@ -915,23 +915,25 @@ static Property escc_properties[] = {
 
 static void escc_class_init(ObjectClass *klass, void *data)
 {
+    DeviceClass *dc = DEVICE_CLASS(klass);
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
 
     k->init = escc_init1;
+    dc->reset = escc_reset;
+    dc->vmsd = &vmstate_escc;
+    dc->props = escc_properties;
 }
 
-static DeviceInfo escc_info = {
-    .name = "escc",
-    .size = sizeof(SerialState),
-    .vmsd = &vmstate_escc,
-    .reset = escc_reset,
-    .props = escc_properties,
-    .class_init = escc_class_init,
+static TypeInfo escc_info = {
+    .name          = "escc",
+    .parent        = TYPE_SYS_BUS_DEVICE,
+    .instance_size = sizeof(SerialState),
+    .class_init    = escc_class_init,
 };
 
 static void escc_register_devices(void)
 {
-    sysbus_register_withprop(&escc_info);
+    type_register_static(&escc_info);
 }
 
 device_init(escc_register_devices)