target/avr/cpu: Use device_class_set_parent_realize()
PATCH 1/1 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é <[email protected]>
--- target/avr/cpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
target/avr/cpu.c +1 -3
@@ -190,9 +190,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;
Signature · 1 line
2.26.2
Quoted 8 lines · Philippe Mathieu-Daudé
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]>--- target/avr/cpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
Reviewed-by Richard Henderson <[email protected]>
r~
Laurent Vivier
AppliedLe 01/02/2021 à 09:03, Philippe Mathieu-Daudé a écrit :
Quoted 15 lines
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]>--- target/avr/cpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)target/avr/cpu.c +0
-0
target/avr/cpu.c static void avr_cpu_class_init(ObjectClass *oc, void *data) · line 196
Quoted 10 lines
target/avr/cpu.c +1
-3@@ -190,9 +190,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;
Applied to my trivial-patches branch.
Thanks,
Laurent