[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/10] hw/intc/loongarch_extioi: Add unrealize interface
From: |
Bibo Mao |
Subject: |
[PATCH 06/10] hw/intc/loongarch_extioi: Add unrealize interface |
Date: |
Fri, 20 Sep 2024 17:05: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>
---
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 8ac246c2e6..f17ff39254 100644
--- a/hw/intc/loongarch_extioi.c
+++ b/hw/intc/loongarch_extioi.c
@@ -378,9 +378,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);
}
@@ -462,6 +462,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;
@@ -472,7 +473,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.39.3
- [PATCH 00/10] hw/intc/loongarch_extioi: Split into extioi common and extioi, Bibo Mao, 2024/09/20
- [PATCH 06/10] hw/intc/loongarch_extioi: Add unrealize interface,
Bibo Mao <=
- [PATCH 02/10] include: Move struct LoongArchExtIOI to header file loongarch_extioi_common, Bibo Mao, 2024/09/20
- [PATCH 04/10] hw/intc/loongarch_extioi: Rename LoongArchExtIOI with LoongArchExtIOICommonState, Bibo Mao, 2024/09/20
- [PATCH 03/10] include: Rename LoongArchExtIOI with LoongArchExtIOICommonState, Bibo Mao, 2024/09/20
- [PATCH 05/10] hw/intc/loongarch_extioi: Add common realize interface, Bibo Mao, 2024/09/20
- [PATCH 08/10] hw/intc/loongarch_extioi: Inherit from loongarch_extioi_common, Bibo Mao, 2024/09/20
- [PATCH 09/10] hw/intc/loongarch_extioi: Add pre_save interface, Bibo Mao, 2024/09/20
- [PATCH 07/10] hw/intc/loongarch_extioi: Add common file loongarch_extioi_common, Bibo Mao, 2024/09/20
- [PATCH 01/10] include: Add loongarch_extioi_common header file, Bibo Mao, 2024/09/20
- [PATCH 10/10] hw/intc/loongarch_extioi: Code cleanup about loongarch_extioi, Bibo Mao, 2024/09/20