diff options
Diffstat (limited to 'hw/highbank.c')
-rw-r--r-- | hw/highbank.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/hw/highbank.c b/hw/highbank.c index 9f76716..684178e 100644 --- a/hw/highbank.c +++ b/hw/highbank.c @@ -162,22 +162,24 @@ static int highbank_regs_init(SysBusDevice *dev) static void highbank_regs_class_init(ObjectClass *klass, void *data) { SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(klass); + DeviceClass *dc = DEVICE_CLASS(klass); sbc->init = highbank_regs_init; + dc->desc = "Calxeda Highbank registers"; + dc->vmsd = &vmstate_highbank_regs; + dc->reset = highbank_regs_reset; } -static DeviceInfo highbank_regs_info = { - .name = "highbank-regs", - .desc = "Calxeda Highbank registers", - .size = sizeof(HighbankRegsState), - .vmsd = &vmstate_highbank_regs, - .class_init = highbank_regs_class_init, - .reset = highbank_regs_reset, +static TypeInfo highbank_regs_info = { + .name = "highbank-regs", + .parent = TYPE_SYS_BUS_DEVICE, + .instance_size = sizeof(HighbankRegsState), + .class_init = highbank_regs_class_init, }; static void highbank_regs_register_device(void) { - sysbus_qdev_register(&highbank_regs_info); + type_register_static(&highbank_regs_info); } device_init(highbank_regs_register_device) |