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

login
register
mail settings
Submitter Juan Quintela
Date Aug. 10, 2009, 7:06 p.m.
Message ID <60f7c040c8f4ba4e74b91036acd69a2c60ee0477.1249929857.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/31100/
State Superseded
Headers show

Comments

Juan Quintela - Aug. 10, 2009, 7:06 p.m.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 vl.c |   74 +++++++++++++++++++++++++++++++++---------------------------------
 1 files changed, 37 insertions(+), 37 deletions(-)
malc - Aug. 10, 2009, 9:46 p.m.
On Mon, 10 Aug 2009, Juan Quintela wrote:

> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  vl.c |   74 +++++++++++++++++++++++++++++++++---------------------------------
>  1 files changed, 37 insertions(+), 37 deletions(-)
> 
> diff --git a/vl.c b/vl.c
> index a526cb0..e399f0f 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -4405,81 +4405,81 @@ 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

I'd prefer this to be vertically aligned.

[..snip..]

Patch

diff --git a/vl.c b/vl.c
index a526cb0..e399f0f 100644
--- a/vl.c
+++ b/vl.c
@@ -4405,81 +4405,81 @@  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)