All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] riscv/cpu: use device_class_set_parent_realize
@ 2018-11-26  3:20 ` Mao Zhongyi
  0 siblings, 0 replies; 12+ 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] 12+ messages in thread

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

Thread overview: 12+ 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  3:20 ` [Qemu-riscv] " Mao Zhongyi
2018-11-26  9:06 ` [Qemu-devel] " Bastian Koppelmann
2018-11-26  9:06   ` [Qemu-riscv] " Bastian Koppelmann
2018-11-28  0:34   ` Palmer Dabbelt
2018-11-28  0:34     ` [Qemu-riscv] " Palmer Dabbelt
2018-11-28  1:46     ` maozy
2018-11-28  1:46       ` [Qemu-riscv] " maozy
2018-11-28 18:51       ` Palmer Dabbelt
2018-11-28 18:51         ` [Qemu-riscv] " Palmer Dabbelt
2018-11-26 16:04 ` Alistair Francis
2018-11-26 16:04   ` [Qemu-riscv] " Alistair Francis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.