aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2015-08-20 14:54:36 -0700
committerAndreas Färber <afaerber@suse.de>2015-09-19 16:39:28 +0200
commit98cec76a7076c4a38e16f1a9de170a7942b3be54 (patch)
tree22f0ef15c6c434a10033aeaf77717851e4fc3127 /hw/s390x
parentdcb3d601115eed77aef543fe3a920adc17544e06 (diff)
machine: Set MachineClass::name automatically
Now all TYPE_MACHINE subclasses use MACHINE_TYPE_NAME to generate the class name. So instead of requiring each subclass to set MachineClass::name manually, we can now set it automatically at the TYPE_MACHINE class_base_init() function. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> [AF/ehabkost: Updated for s390-ccw machines] [AF: Cleanup of intermediate virt and vexpress name handling] Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/s390x')
-rw-r--r--hw/s390x/s390-virtio-ccw.c2
-rw-r--r--hw/s390x/s390-virtio.c1
2 files changed, 0 insertions, 3 deletions
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index e738b5b06a..36f78b417c 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -252,7 +252,6 @@ static void ccw_machine_2_4_class_init(ObjectClass *oc, void *data)
{ /* end of list */ }
};
- mc->name = "s390-ccw-virtio-2.4";
mc->desc = "VirtIO-ccw based S390 machine v2.4";
mc->compat_props = compat_props;
}
@@ -267,7 +266,6 @@ static void ccw_machine_2_5_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
- mc->name = "s390-ccw-virtio-2.5";
mc->alias = "s390-ccw-virtio";
mc->desc = "VirtIO-ccw based S390 machine v2.5";
mc->is_default = 1;
diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c
index a1eca0958c..bc013eb3d4 100644
--- a/hw/s390x/s390-virtio.c
+++ b/hw/s390x/s390-virtio.c
@@ -319,7 +319,6 @@ static void s390_machine_class_init(ObjectClass *oc, void *data)
MachineClass *mc = MACHINE_CLASS(oc);
NMIClass *nc = NMI_CLASS(oc);
- mc->name = S390_MACHINE;
mc->alias = "s390";
mc->desc = "VirtIO based S390 machine";
mc->init = s390_init;