summary refs log tree commit diff stats
path: root/hw/pl031.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/pl031.c')
-rw-r--r--hw/pl031.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/hw/pl031.c b/hw/pl031.c
index 4cb8528aee..8416a609ef 100644
--- a/hw/pl031.c
+++ b/hw/pl031.c
@@ -215,22 +215,24 @@ static int pl031_init(SysBusDevice *dev)
 
 static void pl031_class_init(ObjectClass *klass, void *data)
 {
+    DeviceClass *dc = DEVICE_CLASS(klass);
     SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
 
     k->init = pl031_init;
+    dc->no_user = 1;
+    dc->vmsd = &vmstate_pl031;
 }
 
-static DeviceInfo pl031_info = {
-    .name = "pl031",
-    .size = sizeof(pl031_state),
-    .vmsd = &vmstate_pl031,
-    .no_user = 1,
-    .class_init = pl031_class_init,
+static TypeInfo pl031_info = {
+    .name          = "pl031",
+    .parent        = TYPE_SYS_BUS_DEVICE,
+    .instance_size = sizeof(pl031_state),
+    .class_init    = pl031_class_init,
 };
 
 static void pl031_register_devices(void)
 {
-    sysbus_register_withprop(&pl031_info);
+    type_register_static(&pl031_info);
 }
 
 device_init(pl031_register_devices)