hw/scsi: Replace type_register() with type_register_static()
authorZhao Liu <zhao1.liu@intel.com>
Tue, 29 Oct 2024 08:59:24 +0000 (16:59 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 10 Dec 2024 17:49:25 +0000 (18:49 +0100)
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-7-zhao1.liu@intel.com
hw/scsi/megasas.c
hw/scsi/mptsas.c

index b33229d71a4b780dc26057530fdf22ca1b3243db..df58aeb9952af01be3d60f03e1f047932abad93d 100644 (file)
@@ -2576,7 +2576,7 @@ static void megasas_register_types(void)
         type_info.class_init = megasas_class_init;
         type_info.interfaces = info->interfaces;
 
-        type_register(&type_info);
+        type_register_static(&type_info);
     }
 }
 
index 361b75e633aee03c34caa89f7cca20dffb4fc230..c6bc3479e997558219260cbb1f72267cd5aded18 100644 (file)
@@ -1450,7 +1450,7 @@ static const TypeInfo mptsas_info = {
 
 static void mptsas_register_types(void)
 {
-    type_register(&mptsas_info);
+    type_register_static(&mptsas_info);
 }
 
 type_init(mptsas_register_types)