hw/usb: Replace type_register() with type_register_static()
authorZhao Liu <zhao1.liu@intel.com>
Tue, 29 Oct 2024 08:59:26 +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-9-zhao1.liu@intel.com
hw/usb/hcd-ehci-pci.c
hw/usb/hcd-uhci.c

index c94fc9f6c5877dd7a2d64744bd67e5be3927d6f2..dd06451e234f4fc62c24ee90ef92c756ef7e18bc 100644 (file)
@@ -228,7 +228,7 @@ static void ehci_pci_register_types(void)
     for (i = 0; i < ARRAY_SIZE(ehci_pci_info); i++) {
         ehci_type_info.name = ehci_pci_info[i].name;
         ehci_type_info.class_data = ehci_pci_info + i;
-        type_register(&ehci_type_info);
+        type_register_static(&ehci_type_info);
     }
 }
 
index 3d0339af7b9ee1c45d45906fd8e1139262889e9e..65c1f93cc9f320321e4745a3c9f9b2c7894445cc 100644 (file)
@@ -1362,7 +1362,7 @@ static void uhci_register_types(void)
     for (i = 0; i < ARRAY_SIZE(uhci_info); i++) {
         uhci_type_info.name = uhci_info[i].name;
         uhci_type_info.class_data = uhci_info + i;
-        type_register(&uhci_type_info);
+        type_register_static(&uhci_type_info);
     }
 }