Commit 32b530c7d2 for qemu.org

commit 32b530c7d21eef576154044648392d291a339da7
Author: Jamin Lin <jamin_lin@aspeedtech.com>
Date:   Mon Jun 1 02:50:23 2026 +0000

    hw/intc/aspeed_vic: Convert to DEFINE_TYPES() with inlined TypeInfo

    Replace the legacy type_register_static()/type_init() registration
    pattern with the modern DEFINE_TYPES() macro.

    Inline the standalone 'aspeed_vic_info' TypeInfo variable directly
    into the 'aspeed_vic_types[]' array, removing the need for a separate
    declaration.

    No functional change.

    Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
    Reviewed-by: Cédric Le Goater <clg@redhat.com>
    Link: https://lore.kernel.org/qemu-devel/20260601024959.2347639-16-jamin_lin@aspeedtech.com
    Signed-off-by: Cédric Le Goater <clg@redhat.com>

diff --git a/hw/intc/aspeed_vic.c b/hw/intc/aspeed_vic.c
index 13d8423d83..bd0c87802e 100644
--- a/hw/intc/aspeed_vic.c
+++ b/hw/intc/aspeed_vic.c
@@ -349,16 +349,13 @@ static void aspeed_vic_class_init(ObjectClass *klass, const void *data)
     dc->vmsd = &vmstate_aspeed_vic;
 }

-static const TypeInfo aspeed_vic_info = {
-    .name = TYPE_ASPEED_VIC,
-    .parent = TYPE_SYS_BUS_DEVICE,
-    .instance_size = sizeof(AspeedVICState),
-    .class_init = aspeed_vic_class_init,
+static const TypeInfo aspeed_vic_types[] = {
+    {
+        .name = TYPE_ASPEED_VIC,
+        .parent = TYPE_SYS_BUS_DEVICE,
+        .instance_size = sizeof(AspeedVICState),
+        .class_init = aspeed_vic_class_init,
+    }
 };

-static void aspeed_vic_register_types(void)
-{
-    type_register_static(&aspeed_vic_info);
-}
-
-type_init(aspeed_vic_register_types);
+DEFINE_TYPES(aspeed_vic_types)