Commit cc611b8a authored by Jean-Francois Moine's avatar Jean-Francois Moine Committed by Mauro Carvalho Chehab

V4L/DVB (10049): gspca - many subdrivers: Set 'const' the pixel format table.

Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 4c98834a
...@@ -93,7 +93,7 @@ static struct ctrl sd_ctrls[] = { ...@@ -93,7 +93,7 @@ static struct ctrl sd_ctrls[] = {
}, },
}; };
static struct v4l2_pix_format vga_mode[] = { static const struct v4l2_pix_format vga_mode[] = {
{176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 176, .bytesperline = 176,
.sizeimage = 176 * 144 * 3 / 8 + 590, .sizeimage = 176 * 144 * 3 / 8 + 590,
......
...@@ -112,7 +112,7 @@ static struct ctrl sd_ctrls[] = { ...@@ -112,7 +112,7 @@ static struct ctrl sd_ctrls[] = {
}, },
}; };
static struct v4l2_pix_format vga_mode[] = { static const struct v4l2_pix_format vga_mode[] = {
{320, 240, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, {320, 240, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
.bytesperline = 320, .bytesperline = 320,
.sizeimage = 320 * 240, .sizeimage = 320 * 240,
...@@ -125,7 +125,7 @@ static struct v4l2_pix_format vga_mode[] = { ...@@ -125,7 +125,7 @@ static struct v4l2_pix_format vga_mode[] = {
.priv = 0}, */ .priv = 0}, */
}; };
static struct v4l2_pix_format sif_mode[] = { static const struct v4l2_pix_format sif_mode[] = {
{176, 144, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, {176, 144, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
.bytesperline = 176, .bytesperline = 176,
.sizeimage = 176 * 144, .sizeimage = 176 * 144,
......
...@@ -72,7 +72,7 @@ struct usb_fpix { ...@@ -72,7 +72,7 @@ struct usb_fpix {
} }
/* These cameras only support 320x200. */ /* These cameras only support 320x200. */
static struct v4l2_pix_format fpix_mode[1] = { static const struct v4l2_pix_format fpix_mode[1] = {
{ 320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, { 320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 320, .bytesperline = 320,
.sizeimage = 320 * 240 * 3 / 8 + 590, .sizeimage = 320 * 240 * 3 / 8 + 590,
......
...@@ -56,7 +56,7 @@ extern int gspca_debug; ...@@ -56,7 +56,7 @@ extern int gspca_debug;
/* device information - set at probe time */ /* device information - set at probe time */
struct cam { struct cam {
int bulk_size; /* buffer size when image transfer by bulk */ int bulk_size; /* buffer size when image transfer by bulk */
struct v4l2_pix_format *cam_mode; /* size nmodes */ const struct v4l2_pix_format *cam_mode; /* size nmodes */
char nmodes; char nmodes;
__u8 bulk_nurbs; /* number of URBs in bulk mode __u8 bulk_nurbs; /* number of URBs in bulk mode
* - cannot be > MAX_NURBS * - cannot be > MAX_NURBS
......
...@@ -39,7 +39,7 @@ struct sd { ...@@ -39,7 +39,7 @@ struct sd {
static struct ctrl sd_ctrls[] = { static struct ctrl sd_ctrls[] = {
}; };
static struct v4l2_pix_format vga_mode[] = { static const struct v4l2_pix_format vga_mode[] = {
{320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 320, .bytesperline = 320,
.sizeimage = 320 * 240 * 3 / 8 + 589, .sizeimage = 320 * 240 * 3 / 8 + 589,
......
...@@ -164,7 +164,7 @@ static struct ctrl sd_ctrls[] = { ...@@ -164,7 +164,7 @@ static struct ctrl sd_ctrls[] = {
}, },
}; };
static struct v4l2_pix_format vga_mode[] = { static const struct v4l2_pix_format vga_mode[] = {
{320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 320, .bytesperline = 320,
.sizeimage = 320 * 240 * 3 / 8 + 590, .sizeimage = 320 * 240 * 3 / 8 + 590,
...@@ -176,7 +176,7 @@ static struct v4l2_pix_format vga_mode[] = { ...@@ -176,7 +176,7 @@ static struct v4l2_pix_format vga_mode[] = {
.colorspace = V4L2_COLORSPACE_JPEG, .colorspace = V4L2_COLORSPACE_JPEG,
.priv = 0}, .priv = 0},
}; };
static struct v4l2_pix_format sif_mode[] = { static const struct v4l2_pix_format sif_mode[] = {
{176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 176, .bytesperline = 176,
.sizeimage = 176 * 144 * 3 / 8 + 590, .sizeimage = 176 * 144 * 3 / 8 + 590,
......
...@@ -55,7 +55,7 @@ struct sd { ...@@ -55,7 +55,7 @@ struct sd {
static struct ctrl sd_ctrls[] = { static struct ctrl sd_ctrls[] = {
}; };
static struct v4l2_pix_format vga_mode[] = { static const struct v4l2_pix_format vga_mode[] = {
{640, 480, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE, {640, 480, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE,
.bytesperline = 640 * 2, .bytesperline = 640 * 2,
.sizeimage = 640 * 480 * 2, .sizeimage = 640 * 480 * 2,
......
...@@ -149,7 +149,7 @@ static struct ctrl sd_ctrls[] = { ...@@ -149,7 +149,7 @@ static struct ctrl sd_ctrls[] = {
}, },
}; };
static struct v4l2_pix_format sif_mode[] = { static const struct v4l2_pix_format sif_mode[] = {
{176, 144, V4L2_PIX_FMT_PAC207, V4L2_FIELD_NONE, {176, 144, V4L2_PIX_FMT_PAC207, V4L2_FIELD_NONE,
.bytesperline = 176, .bytesperline = 176,
.sizeimage = (176 + 2) * 144, .sizeimage = (176 + 2) * 144,
......
...@@ -226,7 +226,7 @@ static struct ctrl sd_ctrls[] = { ...@@ -226,7 +226,7 @@ static struct ctrl sd_ctrls[] = {
}, },
}; };
static struct v4l2_pix_format vga_mode[] = { static const struct v4l2_pix_format vga_mode[] = {
{160, 120, V4L2_PIX_FMT_PJPG, V4L2_FIELD_NONE, {160, 120, V4L2_PIX_FMT_PJPG, V4L2_FIELD_NONE,
.bytesperline = 160, .bytesperline = 160,
.sizeimage = 160 * 120 * 3 / 8 + 590, .sizeimage = 160 * 120 * 3 / 8 + 590,
......
...@@ -227,7 +227,7 @@ static struct ctrl sd_ctrls[] = { ...@@ -227,7 +227,7 @@ static struct ctrl sd_ctrls[] = {
}, },
}; };
static struct v4l2_pix_format vga_mode[] = { static const struct v4l2_pix_format vga_mode[] = {
{160, 120, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, {160, 120, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
.bytesperline = 160, .bytesperline = 160,
.sizeimage = 160 * 120, .sizeimage = 160 * 120,
...@@ -249,7 +249,7 @@ static struct v4l2_pix_format vga_mode[] = { ...@@ -249,7 +249,7 @@ static struct v4l2_pix_format vga_mode[] = {
.colorspace = V4L2_COLORSPACE_SRGB, .colorspace = V4L2_COLORSPACE_SRGB,
.priv = 0}, .priv = 0},
}; };
static struct v4l2_pix_format sif_mode[] = { static const struct v4l2_pix_format sif_mode[] = {
{160, 120, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, {160, 120, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
.bytesperline = 160, .bytesperline = 160,
.sizeimage = 160 * 120, .sizeimage = 160 * 120,
......
...@@ -225,7 +225,7 @@ static __u32 ctrl_dis[] = { ...@@ -225,7 +225,7 @@ static __u32 ctrl_dis[] = {
/* SENSOR_OV7660 6 */ /* SENSOR_OV7660 6 */
}; };
static struct v4l2_pix_format vga_mode[] = { static const struct v4l2_pix_format vga_mode[] = {
{160, 120, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {160, 120, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 160, .bytesperline = 160,
.sizeimage = 160 * 120 * 4 / 8 + 590, .sizeimage = 160 * 120 * 4 / 8 + 590,
......
...@@ -111,7 +111,7 @@ static struct ctrl sd_ctrls[] = { ...@@ -111,7 +111,7 @@ static struct ctrl sd_ctrls[] = {
}, },
}; };
static struct v4l2_pix_format vga_mode[] = { static const struct v4l2_pix_format vga_mode[] = {
{320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 320, .bytesperline = 320,
.sizeimage = 320 * 240 * 3 / 8 + 590, .sizeimage = 320 * 240 * 3 / 8 + 590,
...@@ -124,7 +124,7 @@ static struct v4l2_pix_format vga_mode[] = { ...@@ -124,7 +124,7 @@ static struct v4l2_pix_format vga_mode[] = {
.priv = 0}, .priv = 0},
}; };
static struct v4l2_pix_format sif_mode[] = { static const struct v4l2_pix_format sif_mode[] = {
{176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 176, .bytesperline = 176,
.sizeimage = 176 * 144 * 3 / 8 + 590, .sizeimage = 176 * 144 * 3 / 8 + 590,
......
...@@ -132,7 +132,7 @@ static struct ctrl sd_ctrls[] = { ...@@ -132,7 +132,7 @@ static struct ctrl sd_ctrls[] = {
}, },
}; };
static struct v4l2_pix_format vga_mode[] = { static const struct v4l2_pix_format vga_mode[] = {
{160, 120, V4L2_PIX_FMT_SPCA501, V4L2_FIELD_NONE, {160, 120, V4L2_PIX_FMT_SPCA501, V4L2_FIELD_NONE,
.bytesperline = 160, .bytesperline = 160,
.sizeimage = 160 * 120 * 3 / 2, .sizeimage = 160 * 120 * 3 / 2,
......
...@@ -59,7 +59,7 @@ static struct ctrl sd_ctrls[] = { ...@@ -59,7 +59,7 @@ static struct ctrl sd_ctrls[] = {
}, },
}; };
static struct v4l2_pix_format vga_mode[] = { static const struct v4l2_pix_format vga_mode[] = {
{160, 120, V4L2_PIX_FMT_SPCA505, V4L2_FIELD_NONE, {160, 120, V4L2_PIX_FMT_SPCA505, V4L2_FIELD_NONE,
.bytesperline = 160, .bytesperline = 160,
.sizeimage = 160 * 120 * 3 / 2, .sizeimage = 160 * 120 * 3 / 2,
......
...@@ -110,7 +110,7 @@ static struct ctrl sd_ctrls[] = { ...@@ -110,7 +110,7 @@ static struct ctrl sd_ctrls[] = {
}, },
}; };
static struct v4l2_pix_format vga_mode[] = { static const struct v4l2_pix_format vga_mode[] = {
{160, 120, V4L2_PIX_FMT_SPCA505, V4L2_FIELD_NONE, {160, 120, V4L2_PIX_FMT_SPCA505, V4L2_FIELD_NONE,
.bytesperline = 160, .bytesperline = 160,
.sizeimage = 160 * 120 * 3 / 2, .sizeimage = 160 * 120 * 3 / 2,
......
...@@ -62,7 +62,7 @@ static struct ctrl sd_ctrls[] = { ...@@ -62,7 +62,7 @@ static struct ctrl sd_ctrls[] = {
}, },
}; };
static struct v4l2_pix_format sif_mode[] = { static const struct v4l2_pix_format sif_mode[] = {
{160, 120, V4L2_PIX_FMT_SPCA508, V4L2_FIELD_NONE, {160, 120, V4L2_PIX_FMT_SPCA508, V4L2_FIELD_NONE,
.bytesperline = 160, .bytesperline = 160,
.sizeimage = 160 * 120 * 3 / 2, .sizeimage = 160 * 120 * 3 / 2,
......
...@@ -73,7 +73,7 @@ struct sd { ...@@ -73,7 +73,7 @@ struct sd {
#define AG_CNT_START 13 #define AG_CNT_START 13
}; };
static struct v4l2_pix_format sif_012a_mode[] = { static const struct v4l2_pix_format sif_012a_mode[] = {
{160, 120, V4L2_PIX_FMT_SGBRG8, V4L2_FIELD_NONE, {160, 120, V4L2_PIX_FMT_SGBRG8, V4L2_FIELD_NONE,
.bytesperline = 160, .bytesperline = 160,
.sizeimage = 160 * 120, .sizeimage = 160 * 120,
...@@ -96,7 +96,7 @@ static struct v4l2_pix_format sif_012a_mode[] = { ...@@ -96,7 +96,7 @@ static struct v4l2_pix_format sif_012a_mode[] = {
.priv = 0}, .priv = 0},
}; };
static struct v4l2_pix_format sif_072a_mode[] = { static const struct v4l2_pix_format sif_072a_mode[] = {
{160, 120, V4L2_PIX_FMT_SGBRG8, V4L2_FIELD_NONE, {160, 120, V4L2_PIX_FMT_SGBRG8, V4L2_FIELD_NONE,
.bytesperline = 160, .bytesperline = 160,
.sizeimage = 160 * 120, .sizeimage = 160 * 120,
......
...@@ -109,7 +109,7 @@ static struct ctrl sd_ctrls[] = { ...@@ -109,7 +109,7 @@ static struct ctrl sd_ctrls[] = {
}, },
}; };
static struct v4l2_pix_format vga_mode[] = { static const struct v4l2_pix_format vga_mode[] = {
{320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 320, .bytesperline = 320,
.sizeimage = 320 * 240 * 3 / 8 + 590, .sizeimage = 320 * 240 * 3 / 8 + 590,
......
...@@ -123,7 +123,7 @@ static struct ctrl sd_ctrls[] = { ...@@ -123,7 +123,7 @@ static struct ctrl sd_ctrls[] = {
}, },
}; };
static struct v4l2_pix_format vga_mode[] = { static const struct v4l2_pix_format vga_mode[] = {
{320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 320, .bytesperline = 320,
.sizeimage = 320 * 240 * 3 / 8 + 590, .sizeimage = 320 * 240 * 3 / 8 + 590,
...@@ -136,7 +136,7 @@ static struct v4l2_pix_format vga_mode[] = { ...@@ -136,7 +136,7 @@ static struct v4l2_pix_format vga_mode[] = {
.priv = 1}, .priv = 1},
}; };
static struct v4l2_pix_format custom_mode[] = { static const struct v4l2_pix_format custom_mode[] = {
{320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 320, .bytesperline = 320,
.sizeimage = 320 * 240 * 3 / 8 + 590, .sizeimage = 320 * 240 * 3 / 8 + 590,
...@@ -149,7 +149,7 @@ static struct v4l2_pix_format custom_mode[] = { ...@@ -149,7 +149,7 @@ static struct v4l2_pix_format custom_mode[] = {
.priv = 1}, .priv = 1},
}; };
static struct v4l2_pix_format vga_mode2[] = { static const struct v4l2_pix_format vga_mode2[] = {
{176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 176, .bytesperline = 176,
.sizeimage = 176 * 144 * 3 / 8 + 590, .sizeimage = 176 * 144 * 3 / 8 + 590,
......
...@@ -233,7 +233,7 @@ static char *effects_control[] = { ...@@ -233,7 +233,7 @@ static char *effects_control[] = {
"Negative", "Negative",
}; };
static struct v4l2_pix_format vga_mode_t16[] = { static const struct v4l2_pix_format vga_mode_t16[] = {
{160, 120, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {160, 120, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 160, .bytesperline = 160,
.sizeimage = 160 * 120 * 4 / 8 + 590, .sizeimage = 160 * 120 * 4 / 8 + 590,
......
...@@ -73,7 +73,7 @@ static struct ctrl sd_ctrls[] = { ...@@ -73,7 +73,7 @@ static struct ctrl sd_ctrls[] = {
}, },
}; };
static struct v4l2_pix_format sif_mode[] = { static const struct v4l2_pix_format sif_mode[] = {
{176, 144, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, {176, 144, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
.bytesperline = 176, .bytesperline = 176,
.sizeimage = 176 * 144, .sizeimage = 176 * 144,
......
...@@ -126,7 +126,7 @@ static struct ctrl sd_ctrls[] = { ...@@ -126,7 +126,7 @@ static struct ctrl sd_ctrls[] = {
}, },
}; };
static struct v4l2_pix_format vc0321_mode[] = { static const struct v4l2_pix_format vc0321_mode[] = {
{320, 240, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE, {320, 240, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE,
.bytesperline = 320, .bytesperline = 320,
.sizeimage = 320 * 240 * 2, .sizeimage = 320 * 240 * 2,
...@@ -138,7 +138,7 @@ static struct v4l2_pix_format vc0321_mode[] = { ...@@ -138,7 +138,7 @@ static struct v4l2_pix_format vc0321_mode[] = {
.colorspace = V4L2_COLORSPACE_SRGB, .colorspace = V4L2_COLORSPACE_SRGB,
.priv = 0}, .priv = 0},
}; };
static struct v4l2_pix_format vc0323_mode[] = { static const struct v4l2_pix_format vc0323_mode[] = {
{320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 320, .bytesperline = 320,
.sizeimage = 320 * 240 * 3 / 8 + 590, .sizeimage = 320 * 240 * 3 / 8 + 590,
...@@ -151,7 +151,7 @@ static struct v4l2_pix_format vc0323_mode[] = { ...@@ -151,7 +151,7 @@ static struct v4l2_pix_format vc0323_mode[] = {
.priv = 0}, .priv = 0},
}; };
static struct v4l2_pix_format svga_mode[] = { static const struct v4l2_pix_format svga_mode[] = {
{800, 600, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {800, 600, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 800, .bytesperline = 800,
.sizeimage = 800 * 600 * 1 / 4 + 590, .sizeimage = 800 * 600 * 1 / 4 + 590,
......
...@@ -173,7 +173,7 @@ static struct ctrl sd_ctrls[] = { ...@@ -173,7 +173,7 @@ static struct ctrl sd_ctrls[] = {
}, },
}; };
static struct v4l2_pix_format vga_mode[] = { static const struct v4l2_pix_format vga_mode[] = {
{320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 320, .bytesperline = 320,
.sizeimage = 320 * 240 * 3 / 8 + 590, .sizeimage = 320 * 240 * 3 / 8 + 590,
...@@ -186,7 +186,7 @@ static struct v4l2_pix_format vga_mode[] = { ...@@ -186,7 +186,7 @@ static struct v4l2_pix_format vga_mode[] = {
.priv = 0}, .priv = 0},
}; };
static struct v4l2_pix_format sif_mode[] = { static const struct v4l2_pix_format sif_mode[] = {
{176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, {176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
.bytesperline = 176, .bytesperline = 176,
.sizeimage = 176 * 144 * 3 / 8 + 590, .sizeimage = 176 * 144 * 3 / 8 + 590,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment