]> Pileus Git - ~andy/linux/commitdiff
V4L/DVB (10049): gspca - many subdrivers: Set 'const' the pixel format table.
authorJean-Francois Moine <moinejf@free.fr>
Mon, 29 Dec 2008 10:49:41 +0000 (07:49 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 30 Dec 2008 11:40:07 +0000 (09:40 -0200)
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
23 files changed:
drivers/media/video/gspca/conex.c
drivers/media/video/gspca/etoms.c
drivers/media/video/gspca/finepix.c
drivers/media/video/gspca/gspca.h
drivers/media/video/gspca/mars.c
drivers/media/video/gspca/ov519.c
drivers/media/video/gspca/ov534.c
drivers/media/video/gspca/pac207.c
drivers/media/video/gspca/pac7311.c
drivers/media/video/gspca/sonixb.c
drivers/media/video/gspca/sonixj.c
drivers/media/video/gspca/spca500.c
drivers/media/video/gspca/spca501.c
drivers/media/video/gspca/spca505.c
drivers/media/video/gspca/spca506.c
drivers/media/video/gspca/spca508.c
drivers/media/video/gspca/spca561.c
drivers/media/video/gspca/stk014.c
drivers/media/video/gspca/sunplus.c
drivers/media/video/gspca/t613.c
drivers/media/video/gspca/tv8532.c
drivers/media/video/gspca/vc032x.c
drivers/media/video/gspca/zc3xx.c

index de28354ea5bac3e0a6a9650ac2266aba2a026ee3..1753f5bb35444c7db2fba72d05016e2b06e36a2d 100644 (file)
@@ -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,
                .bytesperline = 176,
                .sizeimage = 176 * 144 * 3 / 8 + 590,
index 3be30b420a26fea30eb09674c82798152f0519b2..f3cd8ff5cc923b07a4b97367bd5ee99b750127ba 100644 (file)
@@ -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,
                .bytesperline = 320,
                .sizeimage = 320 * 240,
@@ -125,7 +125,7 @@ static struct v4l2_pix_format vga_mode[] = {
                .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,
                .bytesperline = 176,
                .sizeimage = 176 * 144,
index 03cb9446632376eaebb9081ec27291a1d0a41c04..afc8b2dd307bb36df8b40886def1cdef96cb1dd8 100644 (file)
@@ -72,7 +72,7 @@ struct usb_fpix {
 }
 
 /* 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,
                .bytesperline = 320,
                .sizeimage = 320 * 240 * 3 / 8 + 590,
index 79cef31a5e337a9ef663568d7897cd9860d2841e..c90af9cb1e079b6c3aaa322c0ff739a2652207dc 100644 (file)
@@ -56,7 +56,7 @@ extern int gspca_debug;
 /* device information - set at probe time */
 struct cam {
        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;
        __u8 bulk_nurbs;        /* number of URBs in bulk mode
                                 * - cannot be > MAX_NURBS
index 492cdd3b5c849ff8a7f3c99c8d00686df86d9310..3d2090e67a633046417738ce1e14b4d6ec451295 100644 (file)
@@ -39,7 +39,7 @@ struct sd {
 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,
                .bytesperline = 320,
                .sizeimage = 320 * 240 * 3 / 8 + 589,
index a366b3449e8bf170a243f62bbe0c3721eafea43b..ee232956c812523aa050fa77d7f129b257f3db79 100644 (file)
@@ -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,
                .bytesperline = 320,
                .sizeimage = 320 * 240 * 3 / 8 + 590,
@@ -176,7 +176,7 @@ static struct v4l2_pix_format vga_mode[] = {
                .colorspace = V4L2_COLORSPACE_JPEG,
                .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,
                .bytesperline = 176,
                .sizeimage = 176 * 144 * 3 / 8 + 590,
index 406f6bc12d9f71706583c74acbd951eea16269ce..3bf15e4016933ca3b651621cbf29cbb4c36b7873 100644 (file)
@@ -55,7 +55,7 @@ struct sd {
 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,
         .bytesperline = 640 * 2,
         .sizeimage = 640 * 480 * 2,
index e46b8e8f0a7e0d50c06888ec8ee8ea7c4f48f5b2..c90ac852bac07eace63ab95756796d8a804f3693 100644 (file)
@@ -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,
                .bytesperline = 176,
                .sizeimage = (176 + 2) * 144,
index 1b72e15cb3aeb008ef84956c96af3fa26a81acd8..a9c95cba710e350e14fb70df6121d2a721700fa1 100644 (file)
@@ -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,
                .bytesperline = 160,
                .sizeimage = 160 * 120 * 3 / 8 + 590,
index ffa714fde85c52fb091199f217f3243edf8a7728..b3e4e0677b683546135400609c373a81d879974d 100644 (file)
@@ -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,
                .bytesperline = 160,
                .sizeimage = 160 * 120,
@@ -249,7 +249,7 @@ static struct v4l2_pix_format vga_mode[] = {
                .colorspace = V4L2_COLORSPACE_SRGB,
                .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,
                .bytesperline = 160,
                .sizeimage = 160 * 120,
index 57232ba96b4ae06460bfe953a4be8185e51d17a2..3373b8d9d2a88fa92c8ec40feb5d4d207d9b17ab 100644 (file)
@@ -225,7 +225,7 @@ static __u32 ctrl_dis[] = {
                                                /* 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,
                .bytesperline = 160,
                .sizeimage = 160 * 120 * 4 / 8 + 590,
index 09ff69791da74f9d2ceb3f7ef2db2da7630a0006..942f04cd44dd4c9e46a28e272fd558a189bf67a3 100644 (file)
@@ -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,
                .bytesperline = 320,
                .sizeimage = 320 * 240 * 3 / 8 + 590,
@@ -124,7 +124,7 @@ static struct v4l2_pix_format vga_mode[] = {
                .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,
                .bytesperline = 176,
                .sizeimage = 176 * 144 * 3 / 8 + 590,
index 9318de9aaf850bcf2fe09c33906dbeeadc6a8f94..82e3e3e2ada1434cf4d0fa36f7d2df81e8121f3f 100644 (file)
@@ -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,
                .bytesperline = 160,
                .sizeimage = 160 * 120 * 3 / 2,
index 895b9fe4018c48e8d1bc6b519ed63c7812ffc45c..2a33a29010ee59f62ca2efed92dc874a23b86e30 100644 (file)
@@ -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,
                .bytesperline = 160,
                .sizeimage = 160 * 120 * 3 / 2,
index 645ee9d44d0267dbb908ddf2e9beea692b413d05..96e2512e0621df5e1cebfaafbb98e436676301d1 100644 (file)
@@ -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,
                .bytesperline = 160,
                .sizeimage = 160 * 120 * 3 / 2,
index 63ec902c895d0398116f30732e098d8d74daeb69..be5d740a315d614b95f7077bcb11b4137e65e32e 100644 (file)
@@ -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,
                .bytesperline = 160,
                .sizeimage = 160 * 120 * 3 / 2,
index 0f7df3b3fba14a9eb7f750e319f1d0e3bd0a88bf..3c9288019e96faea92d22ab0b630404f6c5be0a0 100644 (file)
@@ -73,7 +73,7 @@ struct sd {
 #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,
                .bytesperline = 160,
                .sizeimage = 160 * 120,
@@ -96,7 +96,7 @@ static struct v4l2_pix_format sif_012a_mode[] = {
                .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,
                .bytesperline = 160,
                .sizeimage = 160 * 120,
index 74f57db534c9426cd1ff9fb8d86a69d6dc566878..60de9af87fbbe02504aec63ca6891881d7283f26 100644 (file)
@@ -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,
                .bytesperline = 320,
                .sizeimage = 320 * 240 * 3 / 8 + 590,
index bd9288665a80c26c9e98e8bd451643652c19b023..6d904d5e4c74ef9cd02204e4eabd312652213396 100644 (file)
@@ -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,
                .bytesperline = 320,
                .sizeimage = 320 * 240 * 3 / 8 + 590,
@@ -136,7 +136,7 @@ static struct v4l2_pix_format vga_mode[] = {
                .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,
                .bytesperline = 320,
                .sizeimage = 320 * 240 * 3 / 8 + 590,
@@ -149,7 +149,7 @@ static struct v4l2_pix_format custom_mode[] = {
                .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,
                .bytesperline = 176,
                .sizeimage = 176 * 144 * 3 / 8 + 590,
index 42126b549971fb7b8c2db193f4b5dede00c28054..6ee111a3cbd1e5889a3e7c44c6bdcd847be24b1b 100644 (file)
@@ -233,7 +233,7 @@ static char *effects_control[] = {
        "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,
                .bytesperline = 160,
                .sizeimage = 160 * 120 * 4 / 8 + 590,
index 3eac1cb88520168ff0ce965a4951f6072fd0b9b1..94163cceb28ae0bb6ec051294420288ddbc0816a 100644 (file)
@@ -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,
                .bytesperline = 176,
                .sizeimage = 176 * 144,
index 1793da4f5850773de204517bea85c5b4151813b5..71335dad433ad806113f5782a8a6a66feaaf1dc8 100644 (file)
@@ -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,
                .bytesperline = 320,
                .sizeimage = 320 * 240 * 2,
@@ -138,7 +138,7 @@ static struct v4l2_pix_format vc0321_mode[] = {
                .colorspace = V4L2_COLORSPACE_SRGB,
                .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,
                .bytesperline = 320,
                .sizeimage = 320 * 240 * 3 / 8 + 590,
@@ -151,7 +151,7 @@ static struct v4l2_pix_format vc0323_mode[] = {
                .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,
                .bytesperline = 800,
                .sizeimage = 800 * 600 * 1 / 4 + 590,
index 8ded9e6e8a7a232a2d33b0032b630ec4ac9a098b..ec2a53d53fe269c3886a0ad3bad92a693777f36a 100644 (file)
@@ -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,
                .bytesperline = 320,
                .sizeimage = 320 * 240 * 3 / 8 + 590,
@@ -186,7 +186,7 @@ static struct v4l2_pix_format vga_mode[] = {
                .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,
                .bytesperline = 176,
                .sizeimage = 176 * 144 * 3 / 8 + 590,