mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
hw/cpu/arm: Declare CPU QOM types using DEFINE_TYPES() macro
When multiple QOM types are registered in the same file, it is simpler to use the the DEFINE_TYPES() macro. In particular because type array declared with such macro are easier to review. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Message-id: 20250130112615.3219-7-philmd@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
f096139656
commit
3272ddee8c
4 changed files with 36 additions and 48 deletions
|
@ -152,17 +152,14 @@ static void mpcore_priv_class_init(ObjectClass *klass, void *data)
|
|||
device_class_set_props(dc, mpcore_priv_properties);
|
||||
}
|
||||
|
||||
static const TypeInfo mpcore_priv_info = {
|
||||
.name = TYPE_ARM11MPCORE_PRIV,
|
||||
.parent = TYPE_SYS_BUS_DEVICE,
|
||||
.instance_size = sizeof(ARM11MPCorePriveState),
|
||||
.instance_init = mpcore_priv_initfn,
|
||||
.class_init = mpcore_priv_class_init,
|
||||
static const TypeInfo arm11mp_types[] = {
|
||||
{
|
||||
.name = TYPE_ARM11MPCORE_PRIV,
|
||||
.parent = TYPE_SYS_BUS_DEVICE,
|
||||
.instance_size = sizeof(ARM11MPCorePriveState),
|
||||
.instance_init = mpcore_priv_initfn,
|
||||
.class_init = mpcore_priv_class_init,
|
||||
},
|
||||
};
|
||||
|
||||
static void arm11mpcore_register_types(void)
|
||||
{
|
||||
type_register_static(&mpcore_priv_info);
|
||||
}
|
||||
|
||||
type_init(arm11mpcore_register_types)
|
||||
DEFINE_TYPES(arm11mp_types)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue