[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/24] q800-glue.c: switch TypeInfo registration to use DEFINE_TYP
From: |
Laurent Vivier |
Subject: |
[PULL 08/24] q800-glue.c: switch TypeInfo registration to use DEFINE_TYPES() macro |
Date: |
Thu, 22 Jun 2023 09:55:28 +0200 |
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
The use of the DEFINE_TYPES() macro will soon be recommended over the use of
calling type_init() directly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230621085353.113233-9-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
hw/m68k/q800-glue.c | 29 +++++++++++++----------------
1 file changed, 13 insertions(+), 16 deletions(-)
diff --git a/hw/m68k/q800-glue.c b/hw/m68k/q800-glue.c
index e81f9438f116..34c4f0e9876d 100644
--- a/hw/m68k/q800-glue.c
+++ b/hw/m68k/q800-glue.c
@@ -231,22 +231,19 @@ static void glue_class_init(ObjectClass *klass, void
*data)
nc->nmi_monitor_handler = glue_nmi;
}
-static const TypeInfo glue_info = {
- .name = TYPE_GLUE,
- .parent = TYPE_SYS_BUS_DEVICE,
- .instance_size = sizeof(GLUEState),
- .instance_init = glue_init,
- .instance_finalize = glue_finalize,
- .class_init = glue_class_init,
- .interfaces = (InterfaceInfo[]) {
- { TYPE_NMI },
- { }
+static const TypeInfo glue_info_types[] = {
+ {
+ .name = TYPE_GLUE,
+ .parent = TYPE_SYS_BUS_DEVICE,
+ .instance_size = sizeof(GLUEState),
+ .instance_init = glue_init,
+ .instance_finalize = glue_finalize,
+ .class_init = glue_class_init,
+ .interfaces = (InterfaceInfo[]) {
+ { TYPE_NMI },
+ { }
+ },
},
};
-static void glue_register_types(void)
-{
- type_register_static(&glue_info);
-}
-
-type_init(glue_register_types)
+DEFINE_TYPES(glue_info_types)
--
2.40.1
- [PULL 03/24] q800: introduce Q800MachineState, (continued)
- [PULL 03/24] q800: introduce Q800MachineState, Laurent Vivier, 2023/06/22
- [PULL 02/24] q800: add missing space after parent object in GLUEState, Laurent Vivier, 2023/06/22
- [PULL 10/24] q800: introduce mac-io container memory region, Laurent Vivier, 2023/06/22
- [PULL 17/24] q800: move escc_orgate device to Q800MachineState, Laurent Vivier, 2023/06/22
- [PULL 14/24] hw/net/dp8393x.c: move TYPE_DP8393X and dp8393xState into dp8393x.h, Laurent Vivier, 2023/06/22
- [PULL 21/24] q800: don't access Nubus bus directly from the mac-nubus-bridge device, Laurent Vivier, 2023/06/22
- [PULL 15/24] q800: move dp8393x device to Q800MachineState, Laurent Vivier, 2023/06/22
- [PULL 09/24] q800: move GLUE device to Q800MachineState, Laurent Vivier, 2023/06/22
- [PULL 23/24] mac_via: fix rtc command decoding from PRAM addresses 0x0 to 0xf, Laurent Vivier, 2023/06/22
- [PULL 24/24] mac_via: fix rtc command decoding for the PRAM seconds registers, Laurent Vivier, 2023/06/22
- [PULL 08/24] q800-glue.c: switch TypeInfo registration to use DEFINE_TYPES() macro,
Laurent Vivier <=
- [PULL 11/24] q800: reimplement mac-io region aliasing using IO memory region, Laurent Vivier, 2023/06/22
- [PULL 06/24] q800: move ROM memory region to Q800MachineState, Laurent Vivier, 2023/06/22
- [PULL 13/24] q800: move VIA2 device to Q800MachineState, Laurent Vivier, 2023/06/22
- [PULL 16/24] q800: move ESCC device to Q800MachineState, Laurent Vivier, 2023/06/22
- [PULL 07/24] q800: move GLUE device into separate q800-glue.c file, Laurent Vivier, 2023/06/22
- [PULL 18/24] q800: move ESP device to Q800MachineState, Laurent Vivier, 2023/06/22
- [PULL 20/24] q800: move mac-nubus-bridge device to Q800MachineState, Laurent Vivier, 2023/06/22
- [PULL 05/24] q800: move CPU object into Q800MachineState, Laurent Vivier, 2023/06/22
- [PULL 19/24] q800: move SWIM device to Q800MachineState, Laurent Vivier, 2023/06/22
- [PULL 22/24] q800: move macfb device to Q800MachineState, Laurent Vivier, 2023/06/22