V4L/DVB (13899): gspca - all subdrivers: Make control descriptors constant.
authorMarton Nemeth <nm127@freemail.hu>
Wed, 30 Dec 2009 12:12:41 +0000 (09:12 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 26 Feb 2010 18:10:29 +0000 (15:10 -0300)
The ctrls field of struct sd_desc is declared as const
in gspca.h. It is worth to initialize the content also with
constant values.

Signed-off-by: Marton Nemeth <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
25 files changed:
drivers/media/video/gspca/benq.c
drivers/media/video/gspca/conex.c
drivers/media/video/gspca/etoms.c
drivers/media/video/gspca/mars.c
drivers/media/video/gspca/mr97310a.c
drivers/media/video/gspca/ov534.c
drivers/media/video/gspca/pac207.c
drivers/media/video/gspca/pac7302.c
drivers/media/video/gspca/pac7311.c
drivers/media/video/gspca/sn9c20x.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/stv0680.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 604c087aed3e09401abe38d077294b82e33290ab..43ac4af8d3edb35d35c27d40544a832cf222679c 100644 (file)
@@ -32,7 +32,7 @@ struct sd {
 };
 
 /* V4L2 controls supported by the driver */
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
 };
 
 static const struct v4l2_pix_format vga_mode[] = {
index 7a76eb487d87885f9a73fdbc5efa4e204ddcabaf..19fe6b24c9a34062b8d85c8f56216d323df86ad2 100644 (file)
@@ -52,7 +52,7 @@ static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setcolors(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
        {
            {
                .id      = V4L2_CID_BRIGHTNESS,
index 87ce6af9cef2165cd44b61f13df1c3323efe6072..ecd4d743d2bc15d82f867d6c8ca1a98589690525 100644 (file)
@@ -52,7 +52,7 @@ static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
        {
         {
          .id = V4L2_CID_BRIGHTNESS,
index 9cf8d68c71bf9fa6ffa6438ca99d35fa4e59db58..3d9229e22b25cf2598f6f326750d66f9309e9695 100644 (file)
@@ -54,7 +54,7 @@ static int sd_getgamma(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setsharpness(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getsharpness(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
        {
            {
                .id      = V4L2_CID_BRIGHTNESS,
index 9154870e07d29569b045c1813411fa6177ca8134..a9178d9d6745460e5dd35c61c08442b51f6f33df 100644 (file)
@@ -107,7 +107,7 @@ static void setexposure(struct gspca_dev *gspca_dev);
 static void setgain(struct gspca_dev *gspca_dev);
 
 /* V4L2 controls supported by the driver */
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
 /* Separate brightness control description for Argus QuickClix as it has
    different limits from the other mr97310a cameras */
        {
index 0a6b8f07a69d2898cca1f3fa3ae84ae2da7e1ab4..da55637d07e89b2b97b425e9c3a67603f9852e8e 100644 (file)
@@ -106,7 +106,7 @@ static int sd_getsatur(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setfreq(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls_ov772x[] = {
+static const struct ctrl sd_ctrls_ov772x[] = {
     {                                                  /* 0 */
        {
                .id      = V4L2_CID_BRIGHTNESS,
@@ -277,7 +277,7 @@ static struct ctrl sd_ctrls_ov772x[] = {
        .get = sd_getvflip,
     },
 };
-static struct ctrl sd_ctrls_ov965x[] = {
+static const struct ctrl sd_ctrls_ov965x[] = {
     {                                                  /* 0 */
        {
                .id      = V4L2_CID_BRIGHTNESS,
index 4706a823add0baa395a324acc207bfcdac2b9f6e..5ad4c730b3428cb6d7a8e283028c6cd2d82ab9fd 100644 (file)
@@ -77,7 +77,7 @@ static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setgain(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getgain(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
 #define SD_BRIGHTNESS 0
        {
            {
index be0a353afa3a19157ec1340dfa64200db5f7301c..b87097505bfc405710af4ba26274912306df5edc 100644 (file)
@@ -124,7 +124,7 @@ static int sd_getgain(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setexposure(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getexposure(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
 /* This control is pac7302 only */
        {
            {
index 41f87e9a3426c35784f52b0ecef3d32177e85424..704cf67e1788913682cf6097dd0abaff66bdf2d9 100644 (file)
@@ -88,7 +88,7 @@ static int sd_getgain(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setexposure(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getexposure(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
 /* This control is for both the 7302 and the 7311 */
        {
            {
index 0ca1c06652b1443b8ccd687794f75d364a5c7ee7..e8dd2c36f0e6a8566e1607fc187b78232d73a9d0 100644 (file)
@@ -129,7 +129,7 @@ static int sd_getexposure(struct gspca_dev *gspca_dev, s32 *val);
 static int sd_setautoexposure(struct gspca_dev *gspca_dev, s32 val);
 static int sd_getautoexposure(struct gspca_dev *gspca_dev, s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
        {
 #define BRIGHTNESS_IDX 0
            {
index ddff2b5ee5c2534462ce390ccbf18ad4ffe80c8e..725a1230c8da11c4c01f3169577b0c6112f0b70e 100644 (file)
@@ -145,7 +145,7 @@ static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setfreq(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
 #define BRIGHTNESS_IDX 0
        {
            {
index 94af964772d0a24793655ebdcf25d8a567f1555e..8e4a627dc83f7285add338fee6cffcbbc5e10e2d 100644 (file)
@@ -105,7 +105,7 @@ static int sd_getinfrared(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setfreq(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
 #define BRIGHTNESS_IDX 0
        {
            {
index 7cc302a389de7564163308e345695490726c84d7..b866c73c97db17d738cf1a6be61f71dbab06e3d3 100644 (file)
@@ -68,7 +68,7 @@ static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setcolors(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
        {
            {
                .id      = V4L2_CID_BRIGHTNESS,
index 6761a3048a98a5c50fb6fe0fb4c0b0382ba24514..c99333933e325c34cc79a68925099e0f9a378da1 100644 (file)
@@ -59,7 +59,7 @@ static int sd_getblue_balance(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setred_balance(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getred_balance(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
 #define MY_BRIGHTNESS 0
        {
            {
index 0f9232ff1281577c3dd4c7b57122f7ab2c4daf95..c576eed73abed02dbc5c3db6fb9679ff9aa2fc94 100644 (file)
@@ -42,7 +42,7 @@ struct sd {
 static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
        {
            {
                .id      = V4L2_CID_BRIGHTNESS,
index a2cc81ccf367817c09a68ee9ec2f56b05c4baeb7..89fec4c500afb45a1c53debf35f6cd38763d1710 100644 (file)
@@ -51,7 +51,7 @@ static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_sethue(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_gethue(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
 #define SD_BRIGHTNESS 0
        {
            {
index 4d8e6cf75d5558bb44dbf6b5a472492312f83966..15b2eef8a3f64258a65a105393f1eadbf03e5419 100644 (file)
@@ -45,7 +45,7 @@ struct sd {
 static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
        {
            {
                .id      = V4L2_CID_BRIGHTNESS,
index 58c2f0039af1f65198230dcd1ba5dd6c4c068a9c..dc7f2b0fbc793035724302b80e104178b0dfc34e 100644 (file)
@@ -922,7 +922,7 @@ static int sd_getgain(struct gspca_dev *gspca_dev, __s32 *val)
 }
 
 /* control tables */
-static struct ctrl sd_ctrls_12a[] = {
+static const struct ctrl sd_ctrls_12a[] = {
        {
            {
                .id = V4L2_CID_HUE,
@@ -964,7 +964,7 @@ static struct ctrl sd_ctrls_12a[] = {
        },
 };
 
-static struct ctrl sd_ctrls_72a[] = {
+static const struct ctrl sd_ctrls_72a[] = {
        {
            {
                .id = V4L2_CID_HUE,
index 2e2935532d99bb3b072caf954f757cdfe47c2e2e..0fb534210a2c7f4bfe25ba3ca3737df7314feae1 100644 (file)
@@ -53,7 +53,7 @@ static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setfreq(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
        {
            {
                .id      = V4L2_CID_BRIGHTNESS,
index 2a69d7ccb50dd07434c75cdbc3cf30860a4655a9..856675e00e2d79f36fee3a6be2fcc43e5ffec91d 100644 (file)
@@ -45,7 +45,7 @@ struct sd {
 };
 
 /* V4L2 controls supported by the driver */
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
 };
 
 static int stv_sndctrl(struct gspca_dev *gspca_dev, int set, u8 req, u16 val,
index 56716c6ed96d7567ed5846edb7ee106ecaa6e6ff..472f56883016dfc91f93f8897f5b44b54bf27bfb 100644 (file)
@@ -67,7 +67,7 @@ static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
        {
            {
                .id      = V4L2_CID_BRIGHTNESS,
index 55ef6a7444279b3dda95ade85334c6f598667858..d0c208c6a69062537c5b322150e41067dd13fa2e 100644 (file)
@@ -78,7 +78,7 @@ static int sd_geteffect(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_querymenu(struct gspca_dev *gspca_dev,
                        struct v4l2_querymenu *menu);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
        {
         {
          .id = V4L2_CID_BRIGHTNESS,
index b74a3b6489c77a87087bcd6b22513df536eead79..c7b6eb1e04d56b2b58fa4217e762b8f3dc50881c 100644 (file)
@@ -39,7 +39,7 @@ struct sd {
 static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
        {
         {
          .id = V4L2_CID_BRIGHTNESS,
index dbadb97dd465df15c98cb26b8e5f188b6f6f5764..4989f9afb46e24b2de64290d7ac2adf7a5835461 100644 (file)
@@ -78,7 +78,7 @@ static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setsharpness(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getsharpness(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
 #define BRIGHTNESS_IDX 0
        {
            {
index 845d691d2f3f3f028b0bfbdc9d565c5e9c897122..bdab8c4d8acda0e0b520e0ae9a65307e792d6a55 100644 (file)
@@ -92,7 +92,7 @@ static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setsharpness(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getsharpness(struct gspca_dev *gspca_dev, __s32 *val);
 
-static struct ctrl sd_ctrls[] = {
+static const struct ctrl sd_ctrls[] = {
 #define BRIGHTNESS_IDX 0
 #define SD_BRIGHTNESS 0
        {