diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-02-07 16:09:19 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2025-02-07 16:09:19 +0000 |
| commit | 3272ddee8caf65f31c131dfca2cf1c133edd745c (patch) | |
| tree | b15dc89130936c2606ef1b6737acc6bfa35cc68e /hw/cpu/a15mpcore.c | |
| parent | f09613965664e268b00dfc7b4253065e6a0543a9 (diff) | |
| download | focaccia-qemu-3272ddee8caf65f31c131dfca2cf1c133edd745c.tar.gz focaccia-qemu-3272ddee8caf65f31c131dfca2cf1c133edd745c.zip | |
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>
Diffstat (limited to 'hw/cpu/a15mpcore.c')
| -rw-r--r-- | hw/cpu/a15mpcore.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/hw/cpu/a15mpcore.c b/hw/cpu/a15mpcore.c index 3b0897e54e..d24ab0a6ab 100644 --- a/hw/cpu/a15mpcore.c +++ b/hw/cpu/a15mpcore.c @@ -164,17 +164,14 @@ static void a15mp_priv_class_init(ObjectClass *klass, void *data) /* We currently have no saveable state */ } -static const TypeInfo a15mp_priv_info = { - .name = TYPE_A15MPCORE_PRIV, - .parent = TYPE_SYS_BUS_DEVICE, - .instance_size = sizeof(A15MPPrivState), - .instance_init = a15mp_priv_initfn, - .class_init = a15mp_priv_class_init, +static const TypeInfo a15mp_types[] = { + { + .name = TYPE_A15MPCORE_PRIV, + .parent = TYPE_SYS_BUS_DEVICE, + .instance_size = sizeof(A15MPPrivState), + .instance_init = a15mp_priv_initfn, + .class_init = a15mp_priv_class_init, + }, }; -static void a15mp_register_types(void) -{ - type_register_static(&a15mp_priv_info); -} - -type_init(a15mp_register_types) +DEFINE_TYPES(a15mp_types) |