From: Bernhard Beschow Date: Fri, 3 Jun 2022 18:50:36 +0000 (+0200) Subject: hw/isa/piix4: Use object_initialize_child() for embedded struct X-Git-Tag: v7.1.0-rc0~65^2~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=14f94725c91fb9aebbc8d13241c52ba8b30b39d4;p=thirdparty%2Fqemu.git hw/isa/piix4: Use object_initialize_child() for embedded struct Reported-by: Peter Maydell Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Message-Id: <20220603185045.143789-3-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 9a6d9810378..1d04fb6a552 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -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)