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:
parent
3963e1398e
commit
14f94725c9
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue