aboutsummaryrefslogtreecommitdiff
path: root/hw/ssi-sd.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ssi-sd.c')
-rw-r--r--hw/ssi-sd.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/hw/ssi-sd.c b/hw/ssi-sd.c
index 2d89cfe522..f2e6cecb71 100644
--- a/hw/ssi-sd.c
+++ b/hw/ssi-sd.c
@@ -244,16 +244,24 @@ static int ssi_sd_init(SSISlave *dev)
return 0;
}
-static SSISlaveInfo ssi_sd_info = {
- .qdev.name = "ssi-sd",
- .qdev.size = sizeof(ssi_sd_state),
- .init = ssi_sd_init,
- .transfer = ssi_sd_transfer
+static void ssi_sd_class_init(ObjectClass *klass, void *data)
+{
+ SSISlaveClass *k = SSI_SLAVE_CLASS(klass);
+
+ k->init = ssi_sd_init;
+ k->transfer = ssi_sd_transfer;
+}
+
+static TypeInfo ssi_sd_info = {
+ .name = "ssi-sd",
+ .parent = TYPE_SSI_SLAVE,
+ .instance_size = sizeof(ssi_sd_state),
+ .class_init = ssi_sd_class_init,
};
static void ssi_sd_register_devices(void)
{
- ssi_register_slave(&ssi_sd_info);
+ type_register_static(&ssi_sd_info);
}
device_init(ssi_sd_register_devices)