summaryrefslogtreecommitdiff
path: root/hw/highbank.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/highbank.c')
-rw-r--r--hw/highbank.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/hw/highbank.c b/hw/highbank.c
index 136297ca7..9f767160d 100644
--- a/hw/highbank.c
+++ b/hw/highbank.c
@@ -159,18 +159,25 @@ static int highbank_regs_init(SysBusDevice *dev)
return 0;
}
-static SysBusDeviceInfo highbank_regs_info = {
- .init = highbank_regs_init,
- .qdev.name = "highbank-regs",
- .qdev.desc = "Calxeda Highbank registers",
- .qdev.size = sizeof(HighbankRegsState),
- .qdev.vmsd = &vmstate_highbank_regs,
- .qdev.reset = highbank_regs_reset,
+static void highbank_regs_class_init(ObjectClass *klass, void *data)
+{
+ SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(klass);
+
+ sbc->init = highbank_regs_init;
+}
+
+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 void highbank_regs_register_device(void)
{
- sysbus_register_withprop(&highbank_regs_info);
+ sysbus_qdev_register(&highbank_regs_info);
}
device_init(highbank_regs_register_device)