qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target/avr/cpu: Use device_class_set_parent_realize()
@ 2021-02-01  8:03 Philippe Mathieu-Daudé
  2021-02-03  2:07 ` Richard Henderson
  2021-02-13 23:33 ` Laurent Vivier
  0 siblings, 2 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-02-01  8:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Sarah Harris, Michael Rolnik,
	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é <f4bug@amsat.org>
---
 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 6f3d5a9e4a7..e60036e41ef 100644
--- a/target/avr/cpu.c
+++ b/target/avr/cpu.c
@@ -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;
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-13 23:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-01  8:03 [PATCH] target/avr/cpu: Use device_class_set_parent_realize() Philippe Mathieu-Daudé
2021-02-03  2:07 ` Richard Henderson
2021-02-13 23:33 ` Laurent Vivier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).