From: Philippe Mathieu-Daudé <[email protected]> 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é <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]> Signed-off-by: Laurent Vivier <[email protected]> --- 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 fa0f8e0e80e8..0f4596932baf 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.29.2
