qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC v2 13/20] [trivial] edu: Move edu_info outside functio


From: Eduardo Habkost
Subject: [Qemu-devel] [RFC v2 13/20] [trivial] edu: Move edu_info outside function
Date: Fri, 25 Nov 2016 20:05:49 -0200

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 <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
Changes series v1 -> v2:
* (new patch added to series)
---
 hw/misc/edu.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/hw/misc/edu.c b/hw/misc/edu.c
index 401039c..529721a 100644
--- a/hw/misc/edu.c
+++ b/hw/misc/edu.c
@@ -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)
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]