diff mbox

[1/3] Bring audio cards structs to C99 initializers

Message ID ef31ef15aedfdc2f58c95808dc548b4db88d1b5e.1249948198.git.quintela@redhat.com
State Superseded
Headers show

Commit Message

Juan Quintela Aug. 10, 2009, 11:50 p.m. UTC
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 vl.c |   89 +++++++++++++++++++++++++++--------------------------------------
 1 files changed, 37 insertions(+), 52 deletions(-)
diff mbox

Patch

diff --git a/vl.c b/vl.c
index 8b2b289..2702036 100644
--- a/vl.c
+++ b/vl.c
@@ -4347,82 +4347,67 @@  static const QEMUOption qemu_options[] = {
 struct soundhw soundhw[] = {
 #ifdef HAS_AUDIO_CHOICE
 #if defined(TARGET_I386) || defined(TARGET_MIPS)
-    {
-        "pcspk",
-        "PC speaker",
-        0,
-        1,
-        { .init_isa = pcspk_audio_init }
-    },
+    {.name          = "pcspk",
+     .descr         = "PC speaker",
+     .enabled       = 0,
+     .isa           = 1,
+     .init.init_isa = pcspk_audio_init },
 #endif

 #ifdef CONFIG_SB16
-    {
-        "sb16",
-        "Creative Sound Blaster 16",
-        0,
-        1,
-        { .init_isa = SB16_init }
-    },
+    {.name          = "sb16",
+     .descr         = "Creative Sound Blaster 16",
+     .enabled       = 0,
+     .isa           = 1,
+     .init.init_isa = SB16_init},
 #endif

 #ifdef CONFIG_CS4231A
-    {
-        "cs4231a",
-        "CS4231A",
-        0,
-        1,
-        { .init_isa = cs4231a_init }
-    },
+    {.name          = "cs4231a",
+     .descr         = "CS4231A",
+     .enabled       = 0,
+     .isa           = 1,
+     .init.init_isa = cs4231a_init},
 #endif

 #ifdef CONFIG_ADLIB
-    {
-        "adlib",
+    {.name          = "adlib",
 #ifdef HAS_YMF262
-        "Yamaha YMF262 (OPL3)",
+     .descr         = "Yamaha YMF262 (OPL3)",
 #else
-        "Yamaha YM3812 (OPL2)",
+     .descr         = "Yamaha YM3812 (OPL2)",
 #endif
-        0,
-        1,
-        { .init_isa = Adlib_init }
-    },
+     .enabled       = 0,
+     .isa           = 1,
+     .init.init_isa = Adlib_init},
 #endif

 #ifdef CONFIG_GUS
-    {
-        "gus",
-        "Gravis Ultrasound GF1",
-        0,
-        1,
-        { .init_isa = GUS_init }
-    },
+    {.name          = "gus",
+     .descr         = "Gravis Ultrasound GF1",
+     .enabled       = 0,
+     .isa           = 1,
+     .init.init_isa = GUS_init},
 #endif

 #ifdef CONFIG_AC97
-    {
-        "ac97",
-        "Intel 82801AA AC97 Audio",
-        0,
-        0,
-        { .init_pci = ac97_init }
-    },
+    {.name          = "ac97",
+     .descr         = "Intel 82801AA AC97 Audio",
+     .enabled       = 0,
+     .isa           = 0,
+     .init.init_pci = ac97_init},
 #endif

 #ifdef CONFIG_ES1370
-    {
-        "es1370",
-        "ENSONIQ AudioPCI ES1370",
-        0,
-        0,
-        { .init_pci = es1370_init }
-    },
+    {.name          = "es1370",
+     .descr         = "ENSONIQ AudioPCI ES1370",
+     .enabled       = 0,
+     .isa           = 0,
+     .init.init_pci = es1370_init},
 #endif

 #endif /* HAS_AUDIO_CHOICE */
-
-    { NULL, NULL, 0, 0, { NULL } }
+    {  /* End of list */ }
 };

 static void select_soundhw (const char *optarg)