hda-audio: Set instance_size at base class
Setting instance_size correctly at the base class will help us avoid mistakes when declaring new subclasses. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20200826171005.4055015-3-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
b116cedd5f
commit
edf632ee66
|
@ -898,6 +898,7 @@ static void hda_audio_base_class_init(ObjectClass *klass, void *data)
|
||||||
static const TypeInfo hda_audio_info = {
|
static const TypeInfo hda_audio_info = {
|
||||||
.name = TYPE_HDA_AUDIO,
|
.name = TYPE_HDA_AUDIO,
|
||||||
.parent = TYPE_HDA_CODEC_DEVICE,
|
.parent = TYPE_HDA_CODEC_DEVICE,
|
||||||
|
.instance_size = sizeof(HDAAudioState),
|
||||||
.class_init = hda_audio_base_class_init,
|
.class_init = hda_audio_base_class_init,
|
||||||
.abstract = true,
|
.abstract = true,
|
||||||
};
|
};
|
||||||
|
@ -914,7 +915,6 @@ static void hda_audio_output_class_init(ObjectClass *klass, void *data)
|
||||||
static const TypeInfo hda_audio_output_info = {
|
static const TypeInfo hda_audio_output_info = {
|
||||||
.name = "hda-output",
|
.name = "hda-output",
|
||||||
.parent = TYPE_HDA_AUDIO,
|
.parent = TYPE_HDA_AUDIO,
|
||||||
.instance_size = sizeof(HDAAudioState),
|
|
||||||
.class_init = hda_audio_output_class_init,
|
.class_init = hda_audio_output_class_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -930,7 +930,6 @@ static void hda_audio_duplex_class_init(ObjectClass *klass, void *data)
|
||||||
static const TypeInfo hda_audio_duplex_info = {
|
static const TypeInfo hda_audio_duplex_info = {
|
||||||
.name = "hda-duplex",
|
.name = "hda-duplex",
|
||||||
.parent = TYPE_HDA_AUDIO,
|
.parent = TYPE_HDA_AUDIO,
|
||||||
.instance_size = sizeof(HDAAudioState),
|
|
||||||
.class_init = hda_audio_duplex_class_init,
|
.class_init = hda_audio_duplex_class_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -946,7 +945,6 @@ static void hda_audio_micro_class_init(ObjectClass *klass, void *data)
|
||||||
static const TypeInfo hda_audio_micro_info = {
|
static const TypeInfo hda_audio_micro_info = {
|
||||||
.name = "hda-micro",
|
.name = "hda-micro",
|
||||||
.parent = TYPE_HDA_AUDIO,
|
.parent = TYPE_HDA_AUDIO,
|
||||||
.instance_size = sizeof(HDAAudioState),
|
|
||||||
.class_init = hda_audio_micro_class_init,
|
.class_init = hda_audio_micro_class_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue