mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
hw/intc/loongarch_extioi: Add unrealize interface
For loongarch extioi emulation driver, add unrealize interface and remove instance_finalize interface and move the code to unrealize interface. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn>
This commit is contained in:
parent
aa6330d50c
commit
4abf47126f
1 changed files with 3 additions and 3 deletions
|
@ -372,9 +372,9 @@ static void loongarch_extioi_realize(DeviceState *dev, Error **errp)
|
|||
}
|
||||
}
|
||||
|
||||
static void loongarch_extioi_finalize(Object *obj)
|
||||
static void loongarch_extioi_unrealize(DeviceState *dev)
|
||||
{
|
||||
LoongArchExtIOI *s = LOONGARCH_EXTIOI(obj);
|
||||
LoongArchExtIOICommonState *s = LOONGARCH_EXTIOI(dev);
|
||||
|
||||
g_free(s->cpu);
|
||||
}
|
||||
|
@ -456,6 +456,7 @@ static void loongarch_extioi_class_init(ObjectClass *klass, void *data)
|
|||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
||||
dc->realize = loongarch_extioi_realize;
|
||||
dc->unrealize = loongarch_extioi_unrealize;
|
||||
device_class_set_legacy_reset(dc, loongarch_extioi_reset);
|
||||
device_class_set_props(dc, extioi_properties);
|
||||
dc->vmsd = &vmstate_loongarch_extioi;
|
||||
|
@ -466,7 +467,6 @@ static const TypeInfo loongarch_extioi_info = {
|
|||
.parent = TYPE_SYS_BUS_DEVICE,
|
||||
.instance_size = sizeof(struct LoongArchExtIOI),
|
||||
.class_init = loongarch_extioi_class_init,
|
||||
.instance_finalize = loongarch_extioi_finalize,
|
||||
};
|
||||
|
||||
static void loongarch_extioi_register_types(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue