riscv/cpu: use device_class_set_parent_realize

Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
This commit is contained in:
Mao Zhongyi 2018-11-26 11:20:38 +08:00 committed by Palmer Dabbelt
parent 71a150bc91
commit 41fbbba775
No known key found for this signature in database
GPG Key ID: EF4CA1502CCBAB41
1 changed files with 2 additions and 2 deletions

View File

@ -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;