aboutsummaryrefslogtreecommitdiff
path: root/hw/max111x.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-12-16 13:36:39 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-01-27 10:50:47 -0600
commitcd6c4cf28b529aaee0367256d37f349e3b125818 (patch)
treea13e1eee93c85362ef4ce4c33cc3608412c64f7a /hw/max111x.c
parentba7c05205c4ba2fd08096b0083fc1e5decf3c342 (diff)
ssi: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/max111x.c')
-rw-r--r--hw/max111x.c34
1 files changed, 24 insertions, 10 deletions
diff --git a/hw/max111x.c b/hw/max111x.c
index fc79814bf8..db17842e14 100644
--- a/hw/max111x.c
+++ b/hw/max111x.c
@@ -153,18 +153,32 @@ void max111x_set_input(DeviceState *dev, int line, uint8_t value)
s->input[line] = value;
}
-static SSISlaveInfo max1110_info = {
- .qdev.name = "max1110",
- .qdev.size = sizeof(MAX111xState),
- .init = max1110_init,
- .transfer = max111x_transfer
+static void max1110_class_init(ObjectClass *klass, void *data)
+{
+ SSISlaveClass *k = SSI_SLAVE_CLASS(klass);
+
+ k->init = max1110_init;
+ k->transfer = max111x_transfer;
+}
+
+static DeviceInfo max1110_info = {
+ .name = "max1110",
+ .size = sizeof(MAX111xState),
+ .class_init = max1110_class_init,
};
-static SSISlaveInfo max1111_info = {
- .qdev.name = "max1111",
- .qdev.size = sizeof(MAX111xState),
- .init = max1111_init,
- .transfer = max111x_transfer
+static void max1111_class_init(ObjectClass *klass, void *data)
+{
+ SSISlaveClass *k = SSI_SLAVE_CLASS(klass);
+
+ k->init = max1111_init;
+ k->transfer = max111x_transfer;
+}
+
+static DeviceInfo max1111_info = {
+ .name = "max1111",
+ .size = sizeof(MAX111xState),
+ .class_init = max1111_class_init,
};
static void max111x_register_devices(void)