hw/isa/piix4: Use object_initialize_child() for embedded struct

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220603185045.143789-3-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
This commit is contained in:
Bernhard Beschow 2022-06-03 20:50:36 +02:00 committed by Philippe Mathieu-Daudé
parent 3963e1398e
commit 14f94725c9
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ static void piix4_init(Object *obj)
{
PIIX4State *s = PIIX4_PCI_DEVICE(obj);
object_initialize(&s->rtc, sizeof(s->rtc), TYPE_MC146818_RTC);
object_initialize_child(obj, "rtc", &s->rtc, TYPE_MC146818_RTC);
}
static void piix4_class_init(ObjectClass *klass, void *data)