aboutsummaryrefslogtreecommitdiff
path: root/hw/lm32_sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/lm32_sys.c')
-rw-r--r--hw/lm32_sys.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/hw/lm32_sys.c b/hw/lm32_sys.c
index c83809effd..ba6f4acbaa 100644
--- a/hw/lm32_sys.c
+++ b/hw/lm32_sys.c
@@ -148,23 +148,25 @@ static Property lm32_sys_properties[] = {
static void lm32_sys_class_init(ObjectClass *klass, void *data)
{
+ DeviceClass *dc = DEVICE_CLASS(klass);
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = lm32_sys_init;
+ dc->reset = sys_reset;
+ dc->vmsd = &vmstate_lm32_sys;
+ dc->props = lm32_sys_properties;
}
-static DeviceInfo lm32_sys_info = {
- .name = "lm32-sys",
- .size = sizeof(LM32SysState),
- .vmsd = &vmstate_lm32_sys,
- .reset = sys_reset,
- .props = lm32_sys_properties,
- .class_init = lm32_sys_class_init,
+static TypeInfo lm32_sys_info = {
+ .name = "lm32-sys",
+ .parent = TYPE_SYS_BUS_DEVICE,
+ .instance_size = sizeof(LM32SysState),
+ .class_init = lm32_sys_class_init,
};
static void lm32_sys_register(void)
{
- sysbus_register_withprop(&lm32_sys_info);
+ type_register_static(&lm32_sys_info);
}
device_init(lm32_sys_register)