[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/18] hw/intc/loongarch_extioi: Add unrealize interface
From: |
Bibo Mao |
Subject: |
[PULL 14/18] hw/intc/loongarch_extioi: Add unrealize interface |
Date: |
Mon, 16 Dec 2024 09:56:03 +0800 |
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>
---
hw/intc/loongarch_extioi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/intc/loongarch_extioi.c b/hw/intc/loongarch_extioi.c
index c88e99974a..cc932daaf2 100644
--- a/hw/intc/loongarch_extioi.c
+++ b/hw/intc/loongarch_extioi.c
@@ -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)
--
2.43.5
- [PULL 03/18] hw/intc/loongarch_pch: Merge instance_init() into realize(), (continued)
- [PULL 03/18] hw/intc/loongarch_pch: Merge instance_init() into realize(), Bibo Mao, 2024/12/15
- [PULL 08/18] hw/intc/loongarch_pch: Code cleanup about loongarch_pch_pic, Bibo Mao, 2024/12/15
- [PULL 05/18] hw/intc/loongarch_pch: Move some functions to file loongarch_pic_common, Bibo Mao, 2024/12/15
- [PULL 02/18] include: Move struct LoongArchPCHPIC to loongarch_pic_common header file, Bibo Mao, 2024/12/15
- [PULL 04/18] hw/intc/loongarch_pch: Rename LoongArchPCHPIC with LoongArchPICCommonState, Bibo Mao, 2024/12/15
- [PULL 07/18] hw/intc/loongarch_pch: Add pre_save and post_load interfaces, Bibo Mao, 2024/12/15
- [PULL 06/18] hw/intc/loongarch_pch: Inherit from loongarch_pic_common, Bibo Mao, 2024/12/15
- [PULL 10/18] include: Move struct LoongArchExtIOI to header file loongarch_extioi_common, Bibo Mao, 2024/12/15
- [PULL 09/18] include: Add loongarch_extioi_common header file, Bibo Mao, 2024/12/15
- [PULL 11/18] include: Rename LoongArchExtIOI with LoongArchExtIOICommonState, Bibo Mao, 2024/12/15
- [PULL 14/18] hw/intc/loongarch_extioi: Add unrealize interface,
Bibo Mao <=
- [PULL 12/18] hw/intc/loongarch_extioi: Rename LoongArchExtIOI with LoongArchExtIOICommonState, Bibo Mao, 2024/12/15
- [PULL 13/18] hw/intc/loongarch_extioi: Add common realize interface, Bibo Mao, 2024/12/15
- [PULL 15/18] hw/intc/loongarch_extioi: Add common file loongarch_extioi_common, Bibo Mao, 2024/12/15
- Re: [PULL 00/18] loongarch-to-apply queue, Stefan Hajnoczi, 2024/12/16
- [PULL 00/18] loongarch-to-apply queue, Bibo Mao, 2024/12/19