aboutsummaryrefslogtreecommitdiff
path: root/hw/tosa.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/tosa.c')
-rw-r--r--hw/tosa.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/hw/tosa.c b/hw/tosa.c
index 5f4968de24..9f112b1349 100644
--- a/hw/tosa.c
+++ b/hw/tosa.c
@@ -259,13 +259,20 @@ static void tosapda_machine_init(void)
machine_init(tosapda_machine_init);
-static I2CSlaveInfo tosa_dac_info = {
- .qdev.name = "tosa_dac",
- .qdev.size = sizeof(TosaDACState),
- .init = tosa_dac_init,
- .event = tosa_dac_event,
- .recv = tosa_dac_recv,
- .send = tosa_dac_send
+static void tosa_dac_class_init(ObjectClass *klass, void *data)
+{
+ I2CSlaveClass *k = I2C_SLAVE_CLASS(klass);
+
+ k->init = tosa_dac_init;
+ k->event = tosa_dac_event;
+ k->recv = tosa_dac_recv;
+ k->send = tosa_dac_send;
+}
+
+static DeviceInfo tosa_dac_info = {
+ .name = "tosa_dac",
+ .size = sizeof(TosaDACState),
+ .class_init = tosa_dac_class_init,
};
static void tosa_ssp_class_init(ObjectClass *klass, void *data)