瀏覽代碼

hw/net: 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-4-zhao1.liu@intel.com
Zhao Liu 9 月之前
父節點
當前提交
29ec04f089
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      hw/net/e1000.c
  2. 1 1
      hw/net/eepro100.c

+ 1 - 1
hw/net/e1000.c

@@ -1774,7 +1774,7 @@ static void e1000_register_types(void)
         type_info.class_data = (void *)info;
         type_info.class_data = (void *)info;
         type_info.class_init = e1000_class_init;
         type_info.class_init = e1000_class_init;
 
 
-        type_register(&type_info);
+        type_register_static(&type_info);
     }
     }
 }
 }
 
 

+ 1 - 1
hw/net/eepro100.c

@@ -2102,7 +2102,7 @@ static void eepro100_register_types(void)
             { },
             { },
         };
         };
 
 
-        type_register(&type_info);
+        type_register_static(&type_info);
     }
     }
 }
 }