hw/sensor: Replace type_register() with type_register_static()
authorZhao Liu <zhao1.liu@intel.com>
Tue, 29 Oct 2024 08:59:25 +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-8-zhao1.liu@intel.com
hw/sensor/tmp421.c

index b6f0b62ab11b08243c803eda468fb20716d5c86b..82e604279c5aff135a2d4e79913f01185bf9dc81 100644 (file)
@@ -384,7 +384,7 @@ static void tmp421_register_types(void)
             .class_init = tmp421_class_init,
             .class_data = (void *) &devices[i],
         };
-        type_register(&ti);
+        type_register_static(&ti);
     }
 }