q800-glue.c: switch TypeInfo registration to use DEFINE_TYPES() macro
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>
This commit is contained in:
parent
8e0932802f
commit
101b4764c7
|
@ -231,22 +231,19 @@ static void glue_class_init(ObjectClass *klass, void *data)
|
||||||
nc->nmi_monitor_handler = glue_nmi;
|
nc->nmi_monitor_handler = glue_nmi;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const TypeInfo glue_info = {
|
static const TypeInfo glue_info_types[] = {
|
||||||
.name = TYPE_GLUE,
|
{
|
||||||
.parent = TYPE_SYS_BUS_DEVICE,
|
.name = TYPE_GLUE,
|
||||||
.instance_size = sizeof(GLUEState),
|
.parent = TYPE_SYS_BUS_DEVICE,
|
||||||
.instance_init = glue_init,
|
.instance_size = sizeof(GLUEState),
|
||||||
.instance_finalize = glue_finalize,
|
.instance_init = glue_init,
|
||||||
.class_init = glue_class_init,
|
.instance_finalize = glue_finalize,
|
||||||
.interfaces = (InterfaceInfo[]) {
|
.class_init = glue_class_init,
|
||||||
{ TYPE_NMI },
|
.interfaces = (InterfaceInfo[]) {
|
||||||
{ }
|
{ TYPE_NMI },
|
||||||
|
{ }
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static void glue_register_types(void)
|
DEFINE_TYPES(glue_info_types)
|
||||||
{
|
|
||||||
type_register_static(&glue_info);
|
|
||||||
}
|
|
||||||
|
|
||||||
type_init(glue_register_types)
|
|
||||||
|
|
Loading…
Reference in New Issue