From 14f94725c91fb9aebbc8d13241c52ba8b30b39d4 Mon Sep 17 00:00:00 2001 From: Bernhard Beschow Date: Fri, 3 Jun 2022 20:50:36 +0200 Subject: hw/isa/piix4: Use object_initialize_child() for embedded struct MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é --- hw/isa/piix4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw') diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 9a6d981..1d04fb6 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) -- cgit v1.1