diff options
Diffstat (limited to 'target/mips')
-rw-r--r-- | target/mips/cpu-qom.h | 2 | ||||
-rw-r--r-- | target/mips/cpu.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/target/mips/cpu-qom.h b/target/mips/cpu-qom.h index a430c0fe4b..9d0df6c034 100644 --- a/target/mips/cpu-qom.h +++ b/target/mips/cpu-qom.h @@ -48,7 +48,7 @@ typedef struct MIPSCPUClass { /*< public >*/ DeviceRealize parent_realize; - void (*parent_reset)(CPUState *cpu); + DeviceReset parent_reset; const struct mips_def_t *cpu_def; } MIPSCPUClass; diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 6cd6b9650b..e86cd06548 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -96,14 +96,14 @@ static bool mips_cpu_has_work(CPUState *cs) return has_work; } -/* CPUClass::reset() */ -static void mips_cpu_reset(CPUState *s) +static void mips_cpu_reset(DeviceState *dev) { + CPUState *s = CPU(dev); MIPSCPU *cpu = MIPS_CPU(s); MIPSCPUClass *mcc = MIPS_CPU_GET_CLASS(cpu); CPUMIPSState *env = &cpu->env; - mcc->parent_reset(s); + mcc->parent_reset(dev); memset(env, 0, offsetof(CPUMIPSState, end_reset_fields)); @@ -189,7 +189,7 @@ static void mips_cpu_class_init(ObjectClass *c, void *data) device_class_set_parent_realize(dc, mips_cpu_realizefn, &mcc->parent_realize); - cpu_class_set_parent_reset(cc, mips_cpu_reset, &mcc->parent_reset); + device_class_set_parent_reset(dc, mips_cpu_reset, &mcc->parent_reset); cc->class_by_name = mips_cpu_class_by_name; cc->has_work = mips_cpu_has_work; |