From 27aefd66d6141fd151a03c416d006d804d40b33e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Mon, 1 Feb 2021 09:03:48 +0100 Subject: [PATCH] target/avr/cpu: Use device_class_set_parent_realize() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change generated automatically using the Coccinelle patch included in commit bf853881690 ("qdev: use device_class_set_parent_realize/unrealize/reset()") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20210201080348.438095-1-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- target/avr/cpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/avr/cpu.c b/target/avr/cpu.c index fa0f8e0e80..0f4596932b 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -203,9 +203,7 @@ static void avr_cpu_class_init(ObjectClass *oc, void *data) CPUClass *cc = CPU_CLASS(oc); AVRCPUClass *mcc = AVR_CPU_CLASS(oc); - mcc->parent_realize = dc->realize; - dc->realize = avr_cpu_realizefn; - + device_class_set_parent_realize(dc, avr_cpu_realizefn, &mcc->parent_realize); device_class_set_parent_reset(dc, avr_cpu_reset, &mcc->parent_reset); cc->class_by_name = avr_cpu_class_by_name; -- 2.30.2