aboutsummaryrefslogtreecommitdiff
path: root/hw/m48t59.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/m48t59.c')
-rw-r--r--hw/m48t59.c31
1 files changed, 20 insertions, 11 deletions
diff --git a/hw/m48t59.c b/hw/m48t59.c
index 5912cd6..262cfb8 100644
--- a/hw/m48t59.c
+++ b/hw/m48t59.c
@@ -740,17 +740,26 @@ static DeviceInfo m48t59_isa_info = {
}
};
-static SysBusDeviceInfo m48t59_info = {
- .init = m48t59_init1,
- .qdev.name = "m48t59",
- .qdev.size = sizeof(M48t59SysBusState),
- .qdev.reset = m48t59_reset_sysbus,
- .qdev.props = (Property[]) {
- DEFINE_PROP_UINT32("size", M48t59SysBusState, state.size, -1),
- DEFINE_PROP_UINT32("type", M48t59SysBusState, state.type, -1),
- DEFINE_PROP_HEX32( "io_base", M48t59SysBusState, state.io_base, 0),
- DEFINE_PROP_END_OF_LIST(),
- }
+static Property m48t59_properties[] = {
+ DEFINE_PROP_UINT32("size", M48t59SysBusState, state.size, -1),
+ DEFINE_PROP_UINT32("type", M48t59SysBusState, state.type, -1),
+ DEFINE_PROP_HEX32( "io_base", M48t59SysBusState, state.io_base, 0),
+ DEFINE_PROP_END_OF_LIST(),
+};
+
+static void m48t59_class_init(ObjectClass *klass, void *data)
+{
+ SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
+
+ k->init = m48t59_init1;
+}
+
+static DeviceInfo m48t59_info = {
+ .name = "m48t59",
+ .size = sizeof(M48t59SysBusState),
+ .reset = m48t59_reset_sysbus,
+ .props = m48t59_properties,
+ .class_init = m48t59_class_init,
};
static void m48t59_register_devices(void)