From 41fbbba7753457331d971887a74d9a96066f65ba Mon Sep 17 00:00:00 2001 From: Mao Zhongyi Date: Mon, 26 Nov 2018 11:20:38 +0800 Subject: riscv/cpu: use device_class_set_parent_realize Signed-off-by: Mao Zhongyi Reviewed-by: Bastian Koppelmann Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt --- target/riscv/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'target/riscv') diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index a025a0a..5e8a2cb 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; -- cgit v1.1