i386: Replace type_register() with type_register_static()

Replace type_register() with type_register_static() because
type_register() will be deprecated.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20241029085934.2799066-11-zhao1.liu@intel.com
This commit is contained in:
Zhao Liu 2024-10-29 16:59:28 +08:00 committed by Paolo Bonzini
parent 3b5f307038
commit 81b69b502e
2 changed files with 3 additions and 3 deletions

View file

@ -316,7 +316,7 @@ extern const size_t pc_compat_2_3_len;
}; \ }; \
static void pc_machine_init_##suffix(void) \ static void pc_machine_init_##suffix(void) \
{ \ { \
type_register(&pc_machine_type_##suffix); \ type_register_static(&pc_machine_type_##suffix); \
} \ } \
type_init(pc_machine_init_##suffix) type_init(pc_machine_init_##suffix)
@ -344,7 +344,7 @@ extern const size_t pc_compat_2_3_len;
static void MACHINE_VER_SYM(register, namesym, __VA_ARGS__)(void) \ static void MACHINE_VER_SYM(register, namesym, __VA_ARGS__)(void) \
{ \ { \
MACHINE_VER_DELETION(__VA_ARGS__); \ MACHINE_VER_DELETION(__VA_ARGS__); \
type_register(&MACHINE_VER_SYM(info, namesym, __VA_ARGS__)); \ type_register_static(&MACHINE_VER_SYM(info, namesym, __VA_ARGS__)); \
} \ } \
type_init(MACHINE_VER_SYM(register, namesym, __VA_ARGS__)); type_init(MACHINE_VER_SYM(register, namesym, __VA_ARGS__));

View file

@ -6429,7 +6429,7 @@ static void x86_register_cpu_model_type(const char *name, X86CPUModel *model)
.class_data = model, .class_data = model,
}; };
type_register(&ti); type_register_static(&ti);
} }