qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] riscv/cpu: use device_class_set_parent_realize
@ 2018-11-26  3:20 Mao Zhongyi
  2018-11-26  9:06 ` Bastian Koppelmann
  2018-11-26 16:04 ` Alistair Francis
  0 siblings, 2 replies; 6+ messages in thread
From: Mao Zhongyi @ 2018-11-26  3:20 UTC (permalink / raw)
  To: qemu-devel, qemu-riscv
  Cc: mjc, palmer, Alistair.Francis, sagark, kbastian, philmd,
	Mao Zhongyi

Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
---
 target/riscv/cpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index a025a0a3ba..5e8a2cb2ba 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -330,8 +330,8 @@ static void riscv_cpu_class_init(ObjectClass *c, void *data)
     CPUClass *cc = CPU_CLASS(c);
     DeviceClass *dc = DEVICE_CLASS(c);
 
-    mcc->parent_realize = dc->realize;
-    dc->realize = riscv_cpu_realize;
+    device_class_set_parent_realize(dc, riscv_cpu_realize,
+                                    &mcc->parent_realize);
 
     mcc->parent_reset = cc->reset;
     cc->reset = riscv_cpu_reset;
-- 
2.17.1

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

end of thread, other threads:[~2018-11-28 18:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-26  3:20 [Qemu-devel] [PATCH] riscv/cpu: use device_class_set_parent_realize Mao Zhongyi
2018-11-26  9:06 ` Bastian Koppelmann
2018-11-28  0:34   ` Palmer Dabbelt
2018-11-28  1:46     ` maozy
2018-11-28 18:51       ` Palmer Dabbelt
2018-11-26 16:04 ` Alistair Francis

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).