ui: 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-15-zhao1.liu@intel.com
This commit is contained in:
Zhao Liu 2024-10-29 16:59:32 +08:00 committed by Paolo Bonzini
parent 2780dd6acb
commit e5d60d930c
4 changed files with 4 additions and 4 deletions

View file

@ -1073,6 +1073,6 @@ void qemu_console_early_init(void)
{
/* set the default vc driver */
if (!object_class_by_name(TYPE_CHARDEV_VC)) {
type_register(&char_vc_type_info);
type_register_static(&char_vc_type_info);
}
}

View file

@ -476,7 +476,7 @@ early_dbus_init(DisplayOptions *opts)
#endif
}
type_register(&dbus_vc_type_info);
type_register_static(&dbus_vc_type_info);
}
static void

View file

@ -2540,7 +2540,7 @@ static void early_gtk_display_init(DisplayOptions *opts)
keycode_map = gd_get_keymap(&keycode_maplen);
#if defined(CONFIG_VTE)
type_register(&char_gd_vc_type_info);
type_register_static(&char_gd_vc_type_info);
#endif
}

View file

@ -173,7 +173,7 @@ static void spice_app_display_early_init(DisplayOptions *opts)
exit(1);
}
type_register(&char_vc_type_info);
type_register_static(&char_vc_type_info);
sock_path = g_strjoin("", app_dir, "/", "spice.sock", NULL);
qopts = qemu_opts_create(list, NULL, 0, &error_abort);