@@ -406,16 +406,16 @@ static void edu_class_init(ObjectClass *class, void *data)
k->class_id = PCI_CLASS_OTHERS;
}
+static const TypeInfo edu_info = {
+ .name = "edu",
+ .parent = TYPE_PCI_DEVICE,
+ .instance_size = sizeof(EduState),
+ .instance_init = edu_instance_init,
+ .class_init = edu_class_init,
+};
+
static void pci_edu_register_types(void)
{
- static const TypeInfo edu_info = {
- .name = "edu",
- .parent = TYPE_PCI_DEVICE,
- .instance_size = sizeof(EduState),
- .instance_init = edu_instance_init,
- .class_init = edu_class_init,
- };
-
type_register_static(&edu_info);
}
type_init(pci_edu_register_types)
Follow the same style as other classes. Declaring the struct inside the function doesn't allow us to use the same type of declaration to set the interfaces array. Cc: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- Changes series v1 -> v2: * (new patch added to series) --- hw/misc/edu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)