diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-08-26 13:10:03 -0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-02 07:29:25 -0400 |
commit | edf632ee66f957dbd410e7a55e3bdd02bca9d112 (patch) | |
tree | de799576cedefb24f3aa084861a4170fe4df8507 /hw/audio/hda-codec.c | |
parent | b116cedd5ffe8721a8de16c5bf5f792866b8eb31 (diff) | |
download | qemu-edf632ee66f957dbd410e7a55e3bdd02bca9d112.zip qemu-edf632ee66f957dbd410e7a55e3bdd02bca9d112.tar.gz qemu-edf632ee66f957dbd410e7a55e3bdd02bca9d112.tar.bz2 |
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>
Diffstat (limited to 'hw/audio/hda-codec.c')
-rw-r--r-- | hw/audio/hda-codec.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index cbd92b7..2d16448 100644 --- a/hw/audio/hda-codec.c +++ b/hw/audio/hda-codec.c @@ -898,6 +898,7 @@ static void hda_audio_base_class_init(ObjectClass *klass, void *data) static const TypeInfo hda_audio_info = { .name = TYPE_HDA_AUDIO, .parent = TYPE_HDA_CODEC_DEVICE, + .instance_size = sizeof(HDAAudioState), .class_init = hda_audio_base_class_init, .abstract = true, }; @@ -914,7 +915,6 @@ static void hda_audio_output_class_init(ObjectClass *klass, void *data) static const TypeInfo hda_audio_output_info = { .name = "hda-output", .parent = TYPE_HDA_AUDIO, - .instance_size = sizeof(HDAAudioState), .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 = { .name = "hda-duplex", .parent = TYPE_HDA_AUDIO, - .instance_size = sizeof(HDAAudioState), .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 = { .name = "hda-micro", .parent = TYPE_HDA_AUDIO, - .instance_size = sizeof(HDAAudioState), .class_init = hda_audio_micro_class_init, }; |