From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bC7gH-00070E-KA for qemu-devel@nongnu.org; Sun, 12 Jun 2016 11:52:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bC7gF-0007Vh-PW for qemu-devel@nongnu.org; Sun, 12 Jun 2016 11:52:08 -0400 From: Andrew Jones Date: Sun, 12 Jun 2016 17:51:50 +0200 Message-Id: <1465746713-30414-2-git-send-email-drjones@redhat.com> In-Reply-To: <1465746713-30414-1-git-send-email-drjones@redhat.com> References: <1465746713-30414-1-git-send-email-drjones@redhat.com> Subject: [Qemu-devel] [PATCH v2 1/4] hw/arm/virt: separate versioned type-init code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Cc: peter.maydell@linaro.org, alex.bennee@linaro.org, wei@redhat.com Rename machvirt_info (which is specifically for 2.6 TypeInfo) to machvirt_2_6_info, and separate the type registration of the abstract machine type from the versioned type. Signed-off-by: Andrew Jones Reviewed-by: Peter Maydell --- hw/arm/virt.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 73113cfc4d9c9..57eb7fef251bd 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1387,6 +1387,12 @@ static const TypeInfo virt_machine_info = { .class_init = virt_machine_class_init, }; +static void machvirt_machine_init(void) +{ + type_register_static(&virt_machine_info); +} +type_init(machvirt_machine_init); + static void virt_2_6_instance_init(Object *obj) { VirtMachineState *vms = VIRT_MACHINE(obj); @@ -1428,17 +1434,15 @@ static void virt_2_6_class_init(ObjectClass *oc, void *data) mc->alias = "virt"; } -static const TypeInfo machvirt_info = { +static const TypeInfo machvirt_2_6_info = { .name = MACHINE_TYPE_NAME("virt-2.6"), .parent = TYPE_VIRT_MACHINE, .instance_init = virt_2_6_instance_init, .class_init = virt_2_6_class_init, }; -static void machvirt_machine_init(void) +static void machvirt_machine_2_6_init(void) { - type_register_static(&virt_machine_info); - type_register_static(&machvirt_info); + type_register_static(&machvirt_2_6_info); } - -type_init(machvirt_machine_init); +type_init(machvirt_machine_2_6_init); -- 2.4.11