aboutsummaryrefslogtreecommitdiff
path: root/hw/z2.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/z2.c
parentba7c05205c4ba2fd08096b0083fc1e5decf3c342 (diff)
ssi: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/z2.c')
-rw-r--r--hw/z2.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/hw/z2.c b/hw/z2.c
index 8d48488331..f895892f93 100644
--- a/hw/z2.c
+++ b/hw/z2.c
@@ -174,12 +174,19 @@ static VMStateDescription vmstate_zipit_lcd_state = {
}
};
-static SSISlaveInfo zipit_lcd_info = {
- .qdev.name = "zipit-lcd",
- .qdev.size = sizeof(ZipitLCD),
- .qdev.vmsd = &vmstate_zipit_lcd_state,
- .init = zipit_lcd_init,
- .transfer = zipit_lcd_transfer
+static void zipit_lcd_class_init(ObjectClass *klass, void *data)
+{
+ SSISlaveClass *k = SSI_SLAVE_CLASS(klass);
+
+ k->init = zipit_lcd_init;
+ k->transfer = zipit_lcd_transfer;
+}
+
+static DeviceInfo zipit_lcd_info = {
+ .name = "zipit-lcd",
+ .size = sizeof(ZipitLCD),
+ .vmsd = &vmstate_zipit_lcd_state,
+ .class_init = zipit_lcd_class_init,
};
typedef struct {