aboutsummaryrefslogtreecommitdiff
path: root/hw/mips/mips_malta.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2015-09-04 15:37:08 -0300
committerAndreas Färber <afaerber@suse.de>2015-09-19 16:40:15 +0200
commite264d29de28c5b0be3d063307ce9fb613b427cc3 (patch)
tree5e8d9622965ee60421eddbb26dcb42ab8bea7712 /hw/mips/mips_malta.c
parentf309ae852c67833c3cac11747474fbb013529382 (diff)
downloadqemu-e264d29de28c5b0be3d063307ce9fb613b427cc3.zip
qemu-e264d29de28c5b0be3d063307ce9fb613b427cc3.tar.gz
qemu-e264d29de28c5b0be3d063307ce9fb613b427cc3.tar.bz2
Use DEFINE_MACHINE() to register all machines
Convert all machines to use DEFINE_MACHINE() instead of QEMUMachine automatically using a script. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> [AF: Style cleanups, convert imx25_pdk machine] Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/mips/mips_malta.c')
-rw-r--r--hw/mips/mips_malta.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index 1004e37..bb864fe 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -1205,23 +1205,19 @@ static const TypeInfo mips_malta_device = {
.class_init = mips_malta_class_init,
};
-static QEMUMachine mips_malta_machine = {
- .name = "malta",
- .desc = "MIPS Malta Core LV",
- .init = mips_malta_init,
- .max_cpus = 16,
- .is_default = 1,
-};
-
-static void mips_malta_register_types(void)
+static void mips_malta_machine_init(MachineClass *mc)
{
- type_register_static(&mips_malta_device);
+ mc->desc = "MIPS Malta Core LV";
+ mc->init = mips_malta_init;
+ mc->max_cpus = 16;
+ mc->is_default = 1;
}
-static void mips_malta_machine_init(void)
+DEFINE_MACHINE("malta", mips_malta_machine_init)
+
+static void mips_malta_register_types(void)
{
- qemu_register_machine(&mips_malta_machine);
+ type_register_static(&mips_malta_device);
}
type_init(mips_malta_register_types)
-machine_init(mips_malta_machine_init);