aboutsummaryrefslogtreecommitdiff
path: root/hw/intel-hda.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/intel-hda.c')
-rw-r--r--hw/intel-hda.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/hw/intel-hda.c b/hw/intel-hda.c
index e2bd41eb66..e343096534 100644
--- a/hw/intel-hda.c
+++ b/hw/intel-hda.c
@@ -34,16 +34,17 @@ static Property hda_props[] = {
DEFINE_PROP_END_OF_LIST()
};
-static struct BusInfo hda_codec_bus_info = {
- .name = "HDA",
- .size = sizeof(HDACodecBus),
+static const TypeInfo hda_codec_bus_info = {
+ .name = TYPE_HDA_BUS,
+ .parent = TYPE_BUS,
+ .instance_size = sizeof(HDACodecBus),
};
void hda_codec_bus_init(DeviceState *dev, HDACodecBus *bus,
hda_codec_response_func response,
hda_codec_xfer_func xfer)
{
- qbus_create_inplace(&bus->qbus, &hda_codec_bus_info, dev, NULL);
+ qbus_create_inplace(&bus->qbus, TYPE_HDA_BUS, dev, NULL);
bus->response = response;
bus->xfer = xfer;
}
@@ -1276,7 +1277,7 @@ static void hda_codec_device_class_init(ObjectClass *klass, void *data)
DeviceClass *k = DEVICE_CLASS(klass);
k->init = hda_codec_dev_init;
k->exit = hda_codec_dev_exit;
- k->bus_info = &hda_codec_bus_info;
+ k->bus_type = TYPE_HDA_BUS;
k->props = hda_props;
}
@@ -1291,6 +1292,7 @@ static TypeInfo hda_codec_device_type_info = {
static void intel_hda_register_types(void)
{
+ type_register_static(&hda_codec_bus_info);
type_register_static(&intel_hda_info);
type_register_static(&hda_codec_device_type_info);
}