From f80f9ec9a63bb2200d614feb658a77b78f9a4bba Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Wed, 20 May 2009 18:38:09 -0500 Subject: Convert machine registration to use module init functions This cleans up quite a lot of #ifdefs, extern variables, and other ugliness. Signed-off-by: Anthony Liguori --- hw/omap_sx1.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'hw/omap_sx1.c') diff --git a/hw/omap_sx1.c b/hw/omap_sx1.c index 5a538833d1..ee8e39d7cd 100644 --- a/hw/omap_sx1.c +++ b/hw/omap_sx1.c @@ -223,14 +223,22 @@ static void sx1_init_v2(ram_addr_t ram_size, kernel_cmdline, initrd_filename, cpu_model, 2); } -QEMUMachine sx1_machine_v2 = { +static QEMUMachine sx1_machine_v2 = { .name = "sx1", .desc = "Siemens SX1 (OMAP310) V2", .init = sx1_init_v2, }; -QEMUMachine sx1_machine_v1 = { +static QEMUMachine sx1_machine_v1 = { .name = "sx1-v1", .desc = "Siemens SX1 (OMAP310) V1", .init = sx1_init_v1, }; + +static void sx1_machine_init(void) +{ + qemu_register_machine(&sx1_machine_v2); + qemu_register_machine(&sx1_machine_v1); +} + +machine_init(sx1_machine_init); -- cgit 1.4.1