[PATCH 7/14] usual c99 initializer fixes

From: LinuxTV.org CVS maintainer
Date: Wed Oct 08 2003 - 08:37:28 EST


- [DVB] the usual c99 initialization fixes all over the DVB place
diff -uNrwB --new-file xx-linux-2.6.0-test5/drivers/media/dvb/ttpci/av7110.c linux-2.6.0-test5/drivers/media/dvb/ttpci/av7110.c
--- xx-linux-2.6.0-test5/drivers/media/dvb/ttpci/av7110.c 2003-09-10 11:28:41.000000000 +0200
+++ linux-2.6.0-test5/drivers/media/dvb/ttpci/av7110.c 2003-09-10 10:58:29.000000000 +0200
@@ -2608,8 +2615,23 @@
****************************************************************************/

static struct v4l2_input inputs[2] = {
- { 0, "DVB", V4L2_INPUT_TYPE_CAMERA, 1, 0, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 },
- { 1, "ANALOG", V4L2_INPUT_TYPE_TUNER, 2, 1, V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, 0 },
+ {
+ .index = 0,
+ .name = "DVB",
+ .type = V4L2_INPUT_TYPE_CAMERA,
+ .audioset = 1,
+ .tuner = 0, /* ignored */
+ .std = V4L2_STD_PAL_BG|V4L2_STD_NTSC_M,
+ .status = 0,
+ }, {
+ .index = 1,
+ .name = "ANALOG",
+ .type = V4L2_INPUT_TYPE_TUNER,
+ .audioset = 2,
+ .tuner = 0,
+ .std = V4L2_STD_PAL_BG|V4L2_STD_NTSC_M,
+ .status = 0,
+ }
};

/* taken from ves1820.c */
@@ -4629,19 +4673,45 @@
/* FIXME: these values are experimental values that look better than the
values from the latest "official" driver -- at least for me... (MiHu) */
static struct saa7146_standard standard[] = {
- { "PAL", V4L2_STD_PAL, 0x15, 288, 576, 0x4a, 708, 709, 576, 768 },
-// { "PAL", V4L2_STD_PAL, 0x15, 288, 576, 0x3a, 720, 721, 576, 768 },
- { "NTSC", V4L2_STD_NTSC, 0x10, 244, 480, 0x40, 708, 709, 480, 640 },
+ {
+ .name = "PAL", .id = V4L2_STD_PAL_BG,
+ .v_offset = 0x15, .v_field = 288, .v_calc = 576,
+ .h_offset = 0x4a, .h_pixels = 708, .h_calc = 709,
+ .v_max_out = 576, .h_max_out = 768,
+ }, {
+ .name = "NTSC", .id = V4L2_STD_NTSC,
+ .v_offset = 0x10, .v_field = 244, .v_calc = 480,
+ .h_offset = 0x40, .h_pixels = 708, .h_calc = 709,
+ .v_max_out = 480, .h_max_out = 640,
+ }
};

static struct saa7146_standard analog_standard[] = {
- { "PAL", V4L2_STD_PAL, 0x18, 288, 576, 0x08, 708, 709, 576, 768 },
- { "NTSC", V4L2_STD_NTSC, 0x10, 244, 480, 0x40, 708, 709, 480, 640 },
+ {
+ .name = "PAL", .id = V4L2_STD_PAL_BG,
+ .v_offset = 0x18, .v_field = 288, .v_calc = 576,
+ .h_offset = 0x08, .h_pixels = 708, .h_calc = 709,
+ .v_max_out = 576, .h_max_out = 768,
+ }, {
+ .name = "NTSC", .id = V4L2_STD_NTSC,
+ .v_offset = 0x10, .v_field = 244, .v_calc = 480,
+ .h_offset = 0x40, .h_pixels = 708, .h_calc = 709,
+ .v_max_out = 480, .h_max_out = 640,
+ }
};

static struct saa7146_standard dvb_standard[] = {
- { "PAL", V4L2_STD_PAL, 0x14, 288, 576, 0x4a, 708, 709, 576, 768 },
- { "NTSC", V4L2_STD_NTSC, 0x10, 244, 480, 0x40, 708, 709, 480, 640 },
+ {
+ .name = "PAL", .id = V4L2_STD_PAL_BG,
+ .v_offset = 0x14, .v_field = 288, .v_calc = 576,
+ .h_offset = 0x4a, .h_pixels = 708, .h_calc = 709,
+ .v_max_out = 576, .h_max_out = 768,
+ }, {
+ .name = "NTSC", .id = V4L2_STD_NTSC,
+ .v_offset = 0x10, .v_field = 244, .v_calc = 480,
+ .h_offset = 0x40, .h_pixels = 708, .h_calc = 709,
+ .v_max_out = 480, .h_max_out = 640,
+ }
};

static struct saa7146_extension av7110_extension;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/