aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/omap_sx1.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/arm/omap_sx1.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/arm/omap_sx1.c')
-rw-r--r--hw/arm/omap_sx1.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/hw/arm/omap_sx1.c b/hw/arm/omap_sx1.c
index 4de88f3..68924fc 100644
--- a/hw/arm/omap_sx1.c
+++ b/hw/arm/omap_sx1.c
@@ -217,22 +217,18 @@ static void sx1_init_v2(MachineState *machine)
sx1_init(machine, 2);
}
-static QEMUMachine sx1_machine_v2 = {
- .name = "sx1",
- .desc = "Siemens SX1 (OMAP310) V2",
- .init = sx1_init_v2,
-};
+static void sx1_machine_v2_machine_init(MachineClass *mc)
+{
+ mc->desc = "Siemens SX1 (OMAP310) V2";
+ mc->init = sx1_init_v2;
+}
-static QEMUMachine sx1_machine_v1 = {
- .name = "sx1-v1",
- .desc = "Siemens SX1 (OMAP310) V1",
- .init = sx1_init_v1,
-};
+DEFINE_MACHINE("sx1", sx1_machine_v2_machine_init)
-static void sx1_machine_init(void)
+static void sx1_machine_v1_machine_init(MachineClass *mc)
{
- qemu_register_machine(&sx1_machine_v2);
- qemu_register_machine(&sx1_machine_v1);
+ mc->desc = "Siemens SX1 (OMAP310) V1";
+ mc->init = sx1_init_v1;
}
-machine_init(sx1_machine_init);
+DEFINE_MACHINE("sx1-v1", sx1_machine_v1_machine_init)