aboutsummaryrefslogtreecommitdiff
path: root/target/avr
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-02-01 09:03:48 +0100
committerLaurent Vivier <laurent@vivier.eu>2021-02-20 12:36:19 +0100
commit27aefd66d6141fd151a03c416d006d804d40b33e (patch)
treede054f717deaca0f880edaaba4f51b257d6abefb /target/avr
parentba1da4a7f10c4be8831ece6c8a9af54cfc9b559a (diff)
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;