summaryrefslogtreecommitdiffstats
path: root/target/avr
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé2021-02-01 09:03:48 +0100
committerLaurent Vivier2021-02-20 12:36:19 +0100
commit27aefd66d6141fd151a03c416d006d804d40b33e (patch)
treede054f717deaca0f880edaaba4f51b257d6abefb /target/avr
parenthw/scsi/megasas: Remove pointless parenthesis (diff)
downloadqemu-27aefd66d6141fd151a03c416d006d804d40b33e.tar.gz
qemu-27aefd66d6141fd151a03c416d006d804d40b33e.tar.xz
qemu-27aefd66d6141fd151a03c416d006d804d40b33e.zip
target/avr/cpu: Use device_class_set_parent_realize()
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é <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210201080348.438095-1-f4bug@amsat.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'target/avr')
-rw-r--r--target/avr/cpu.c4
1 files changed, 1 insertions, 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;