aboutsummaryrefslogtreecommitdiff
path: root/hw/spitz.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/spitz.c
parentba7c05205c4ba2fd08096b0083fc1e5decf3c342 (diff)
ssi: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/spitz.c')
-rw-r--r--hw/spitz.c39
1 files changed, 27 insertions, 12 deletions
diff --git a/hw/spitz.c b/hw/spitz.c
index 9d129c22b9..0f63139704 100644
--- a/hw/spitz.c
+++ b/hw/spitz.c
@@ -1070,12 +1070,20 @@ static const VMStateDescription vmstate_corgi_ssp_regs = {
}
};
-static SSISlaveInfo corgi_ssp_info = {
- .qdev.name = "corgi-ssp",
- .qdev.size = sizeof(CorgiSSPState),
- .qdev.vmsd = &vmstate_corgi_ssp_regs,
- .init = corgi_ssp_init,
- .transfer = corgi_ssp_transfer
+static void corgi_ssp_class_init(ObjectClass *klass, void *data)
+{
+ SSISlaveClass *k = SSI_SLAVE_CLASS(klass);
+
+ k->init = corgi_ssp_init;
+ k->transfer = corgi_ssp_transfer;
+}
+
+
+static DeviceInfo corgi_ssp_info = {
+ .name = "corgi-ssp",
+ .size = sizeof(CorgiSSPState),
+ .vmsd = &vmstate_corgi_ssp_regs,
+ .class_init = corgi_ssp_class_init,
};
static const VMStateDescription vmstate_spitz_lcdtg_regs = {
@@ -1090,12 +1098,19 @@ static const VMStateDescription vmstate_spitz_lcdtg_regs = {
}
};
-static SSISlaveInfo spitz_lcdtg_info = {
- .qdev.name = "spitz-lcdtg",
- .qdev.size = sizeof(SpitzLCDTG),
- .qdev.vmsd = &vmstate_spitz_lcdtg_regs,
- .init = spitz_lcdtg_init,
- .transfer = spitz_lcdtg_transfer
+static void spitz_lcdtg_class_init(ObjectClass *klass, void *data)
+{
+ SSISlaveClass *k = SSI_SLAVE_CLASS(klass);
+
+ k->init = spitz_lcdtg_init;
+ k->transfer = spitz_lcdtg_transfer;
+}
+
+static DeviceInfo spitz_lcdtg_info = {
+ .name = "spitz-lcdtg",
+ .size = sizeof(SpitzLCDTG),
+ .vmsd = &vmstate_spitz_lcdtg_regs,
+ .class_init = spitz_lcdtg_class_init,
};
static void spitz_register_devices(void)