summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca/zc3xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/gspca/zc3xx.c')
-rw-r--r--linux/drivers/media/video/gspca/zc3xx.c314
1 files changed, 165 insertions, 149 deletions
diff --git a/linux/drivers/media/video/gspca/zc3xx.c b/linux/drivers/media/video/gspca/zc3xx.c
index f8a49a493..72ae1e006 100644
--- a/linux/drivers/media/video/gspca/zc3xx.c
+++ b/linux/drivers/media/video/gspca/zc3xx.c
@@ -24,8 +24,8 @@
#include "gspca.h"
-#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 0)
-static const char version[] = "2.1.0";
+#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 5)
+static const char version[] = "2.1.5";
MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>, "
"Serge A. Suchkov <Serge.A.S@tochka.ru>");
@@ -173,14 +173,30 @@ static struct ctrl sd_ctrls[] = {
},
};
-static struct cam_mode vga_mode[] = {
- {V4L2_PIX_FMT_JPEG, 320, 240, 1},
- {V4L2_PIX_FMT_JPEG, 640, 480, 0},
+static struct v4l2_pix_format vga_mode[] = {
+ {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
+ .bytesperline = 320,
+ .sizeimage = 320 * 240 * 3 / 8 + 590,
+ .colorspace = V4L2_COLORSPACE_JPEG,
+ .priv = 1},
+ {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
+ .bytesperline = 640,
+ .sizeimage = 640 * 480 * 3 / 8 + 590,
+ .colorspace = V4L2_COLORSPACE_JPEG,
+ .priv = 0},
};
-static struct cam_mode sif_mode[] = {
- {V4L2_PIX_FMT_JPEG, 176, 144, 1},
- {V4L2_PIX_FMT_JPEG, 352, 288, 0},
+static struct v4l2_pix_format sif_mode[] = {
+ {176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
+ .bytesperline = 176,
+ .sizeimage = 176 * 144 * 3 / 8 + 590,
+ .colorspace = V4L2_COLORSPACE_JPEG,
+ .priv = 1},
+ {352, 288, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
+ .bytesperline = 352,
+ .sizeimage = 352 * 288 * 3 / 8 + 590,
+ .colorspace = V4L2_COLORSPACE_JPEG,
+ .priv = 0},
};
/* usb exchanges */
@@ -190,7 +206,7 @@ struct usb_action {
__u16 idx;
};
-static struct usb_action cs2102_Initial[] = {
+static const struct usb_action cs2102_Initial[] = {
{0xa1, 0x01, 0x0008},
{0xa1, 0x01, 0x0008},
{0xa0, 0x01, 0x0000},
@@ -320,7 +336,7 @@ static struct usb_action cs2102_Initial[] = {
{}
};
-static struct usb_action cs2102_InitialScale[] = {
+static const struct usb_action cs2102_InitialScale[] = {
{0xa1, 0x01, 0x0008},
{0xa1, 0x01, 0x0008},
{0xa0, 0x01, 0x0000},
@@ -449,7 +465,7 @@ static struct usb_action cs2102_InitialScale[] = {
{0xa0, 0x40, 0x0118},
{}
};
-static struct usb_action cs2102_50HZ[] = {
+static const struct usb_action cs2102_50HZ[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0x0f, 0x008c}, /* 00,0f,8c,aa */
{0xaa, 0x03, 0x0005}, /* 00,03,05,aa */
@@ -474,7 +490,7 @@ static struct usb_action cs2102_50HZ[] = {
{0xa0, 0xd0, 0x001f}, /* 00,1f,d0,cc */
{}
};
-static struct usb_action cs2102_50HZScale[] = {
+static const struct usb_action cs2102_50HZScale[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0x0f, 0x0093}, /* 00,0f,93,aa */
{0xaa, 0x03, 0x0005}, /* 00,03,05,aa */
@@ -499,7 +515,7 @@ static struct usb_action cs2102_50HZScale[] = {
{0xa0, 0xd0, 0x001f}, /* 00,1f,d0,cc */
{}
};
-static struct usb_action cs2102_60HZ[] = {
+static const struct usb_action cs2102_60HZ[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0x0f, 0x005d}, /* 00,0f,5d,aa */
{0xaa, 0x03, 0x0005}, /* 00,03,05,aa */
@@ -524,7 +540,7 @@ static struct usb_action cs2102_60HZ[] = {
{0xa0, 0xd0, 0x00c8}, /* 00,c8,d0,cc */
{}
};
-static struct usb_action cs2102_60HZScale[] = {
+static const struct usb_action cs2102_60HZScale[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0x0f, 0x00b7}, /* 00,0f,b7,aa */
{0xaa, 0x03, 0x0005}, /* 00,03,05,aa */
@@ -549,7 +565,7 @@ static struct usb_action cs2102_60HZScale[] = {
{0xa0, 0xe8, 0x001f}, /* 00,1f,e8,cc */
{}
};
-static struct usb_action cs2102_NoFliker[] = {
+static const struct usb_action cs2102_NoFliker[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0x0f, 0x0059}, /* 00,0f,59,aa */
{0xaa, 0x03, 0x0005}, /* 00,03,05,aa */
@@ -574,7 +590,7 @@ static struct usb_action cs2102_NoFliker[] = {
{0xa0, 0xc8, 0x001f}, /* 00,1f,c8,cc */
{}
};
-static struct usb_action cs2102_NoFlikerScale[] = {
+static const struct usb_action cs2102_NoFlikerScale[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0x0f, 0x0059}, /* 00,0f,59,aa */
{0xaa, 0x03, 0x0005}, /* 00,03,05,aa */
@@ -601,7 +617,7 @@ static struct usb_action cs2102_NoFlikerScale[] = {
};
/* CS2102_KOCOM */
-static struct usb_action cs2102K_Initial[] = {
+static const struct usb_action cs2102K_Initial[] = {
{0xa0, 0x11, 0x0002},
{0xa0, 0x03, 0x0008},
{0xa0, 0x08, 0x0010},
@@ -860,7 +876,7 @@ static struct usb_action cs2102K_Initial[] = {
{}
};
-static struct usb_action cs2102K_InitialScale[] = {
+static const struct usb_action cs2102K_InitialScale[] = {
{0xa0, 0x11, 0x0002},
{0xa0, 0x00, 0x0002},
{0xa0, 0x03, 0x0008},
@@ -1437,7 +1453,7 @@ static struct usb_action cs2102K_InitialScale[] = {
{}
};
-static struct usb_action gc0305_Initial[] = { /* 640x480 */
+static const struct usb_action gc0305_Initial[] = { /* 640x480 */
{0xa0, 0x01, 0x0000}, /* 00,00,01,cc */
{0xa0, 0x03, 0x0008}, /* 00,08,03,cc */
{0xa0, 0x01, 0x0010}, /* 00,10,01,cc */
@@ -1501,7 +1517,7 @@ static struct usb_action gc0305_Initial[] = { /* 640x480 */
{0xa0, 0x03, 0x0113}, /* 01,13,03,cc */
{}
};
-static struct usb_action gc0305_InitialScale[] = { /* 320x240 */
+static const struct usb_action gc0305_InitialScale[] = { /* 320x240 */
{0xa0, 0x01, 0x0000}, /* 00,00,01,cc */
{0xa0, 0x03, 0x0008}, /* 00,08,03,cc */
{0xa0, 0x01, 0x0010}, /* 00,10,01,cc */
@@ -1564,7 +1580,7 @@ static struct usb_action gc0305_InitialScale[] = { /* 320x240 */
{0xa0, 0x03, 0x0113}, /* 01,13,03,cc */
{}
};
-static struct usb_action gc0305_50HZ[] = {
+static const struct usb_action gc0305_50HZ[] = {
{0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
{0xaa, 0x83, 0x0002}, /* 00,83,02,aa */
{0xaa, 0x84, 0x0038}, /* 00,84,38,aa */ /* win: 00,84,ec */
@@ -1587,7 +1603,7 @@ static struct usb_action gc0305_50HZ[] = {
/* {0xa0, 0x85, 0x018d}, * 01,8d,85,cc * * if 640x480 */
{}
};
-static struct usb_action gc0305_60HZ[] = {
+static const struct usb_action gc0305_60HZ[] = {
{0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
{0xaa, 0x83, 0x0000}, /* 00,83,00,aa */
{0xaa, 0x84, 0x00ec}, /* 00,84,ec,aa */
@@ -1611,7 +1627,7 @@ static struct usb_action gc0305_60HZ[] = {
{}
};
-static struct usb_action gc0305_NoFliker[] = {
+static const struct usb_action gc0305_NoFliker[] = {
{0xa0, 0x0c, 0x0100}, /* 01,00,0c,cc */
{0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
{0xaa, 0x83, 0x0000}, /* 00,83,00,aa */
@@ -1635,7 +1651,7 @@ static struct usb_action gc0305_NoFliker[] = {
};
/* play poker with registers at your own risk !! */
-static struct usb_action hdcs2020xx_Initial[] = {
+static const struct usb_action hdcs2020xx_Initial[] = {
{0xa0, 0x01, 0x0000},
{0xa0, 0x03, 0x0008},
{0xa0, 0x0e, 0x0010},
@@ -1780,7 +1796,7 @@ static struct usb_action hdcs2020xx_Initial[] = {
{}
};
-static struct usb_action hdcs2020xx_InitialScale[] = {
+static const struct usb_action hdcs2020xx_InitialScale[] = {
{0xa0, 0x01, 0x0000},
{0xa0, 0x03, 0x0008},
{0xa0, 0x0e, 0x0010},
@@ -1922,7 +1938,7 @@ static struct usb_action hdcs2020xx_InitialScale[] = {
/* {0xa0, 0x18, 0x00fe}, */
{}
};
-static struct usb_action hdcs2020xb_Initial[] = {
+static const struct usb_action hdcs2020xb_Initial[] = {
{0xa0, 0x01, 0x0000},
{0xa0, 0x11, 0x0002},
{0xa0, 0x03, 0x0008}, /* qtable 0x05 */
@@ -2054,7 +2070,7 @@ static struct usb_action hdcs2020xb_Initial[] = {
{0xa0, 0x40, 0x0118},
{}
};
-static struct usb_action hdcs2020xb_InitialScale[] = {
+static const struct usb_action hdcs2020xb_InitialScale[] = {
{0xa0, 0x01, 0x0000},
{0xa0, 0x00, 0x0002},
{0xa0, 0x03, 0x0008},
@@ -2182,7 +2198,7 @@ static struct usb_action hdcs2020xb_InitialScale[] = {
{0xa0, 0x40, 0x0118},
{}
};
-static struct usb_action hdcs2020b_50HZ[] = {
+static const struct usb_action hdcs2020b_50HZ[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0x13, 0x0018}, /* 00,13,18,aa */
{0xaa, 0x14, 0x0001}, /* 00,14,01,aa */
@@ -2203,7 +2219,7 @@ static struct usb_action hdcs2020b_50HZ[] = {
{0xa0, 0x2f, 0x001f}, /* 00,1f,2f,cc */
{}
};
-static struct usb_action hdcs2020b_60HZ[] = {
+static const struct usb_action hdcs2020b_60HZ[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0x13, 0x0031}, /* 00,13,31,aa */
{0xaa, 0x14, 0x0001}, /* 00,14,01,aa */
@@ -2224,7 +2240,7 @@ static struct usb_action hdcs2020b_60HZ[] = {
{0xa0, 0x2c, 0x001f}, /* 00,1f,2c,cc */
{}
};
-static struct usb_action hdcs2020b_NoFliker[] = {
+static const struct usb_action hdcs2020b_NoFliker[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0x13, 0x0010}, /* 00,13,10,aa */
{0xaa, 0x14, 0x0001}, /* 00,14,01,aa */
@@ -2246,7 +2262,7 @@ static struct usb_action hdcs2020b_NoFliker[] = {
{}
};
-static struct usb_action hv7131bxx_Initial[] = {
+static const struct usb_action hv7131bxx_Initial[] = {
{0xa0, 0x01, 0x0000},
{0xa0, 0x10, 0x0002},
{0xa0, 0x00, 0x0010},
@@ -2354,7 +2370,7 @@ static struct usb_action hv7131bxx_Initial[] = {
{}
};
-static struct usb_action hv7131bxx_InitialScale[] = {
+static const struct usb_action hv7131bxx_InitialScale[] = {
{0xa0, 0x01, 0x0000},
{0xa0, 0x00, 0x0002},
{0xa0, 0x00, 0x0010},
@@ -2460,7 +2476,7 @@ static struct usb_action hv7131bxx_InitialScale[] = {
{}
};
-static struct usb_action hv7131cxx_Initial[] = {
+static const struct usb_action hv7131cxx_Initial[] = {
{0xa0, 0x01, 0x0000},
{0xa0, 0x10, 0x0002},
{0xa0, 0x01, 0x0010},
@@ -2554,7 +2570,7 @@ static struct usb_action hv7131cxx_Initial[] = {
{}
};
-static struct usb_action hv7131cxx_InitialScale[] = {
+static const struct usb_action hv7131cxx_InitialScale[] = {
{0xa0, 0x01, 0x0000},
{0xa0, 0x00, 0x0002}, /* diff */
@@ -2655,7 +2671,7 @@ static struct usb_action hv7131cxx_InitialScale[] = {
{}
};
-static struct usb_action icm105axx_Initial[] = {
+static const struct usb_action icm105axx_Initial[] = {
{0xa0, 0x01, 0x0000},
{0xa0, 0x10, 0x0002},
{0xa0, 0x03, 0x0008},
@@ -2832,7 +2848,7 @@ static struct usb_action icm105axx_Initial[] = {
{}
};
-static struct usb_action icm105axx_InitialScale[] = {
+static const struct usb_action icm105axx_InitialScale[] = {
{0xa0, 0x01, 0x0000},
{0xa0, 0x00, 0x0002},
{0xa0, 0x03, 0x0008},
@@ -3011,7 +3027,7 @@ static struct usb_action icm105axx_InitialScale[] = {
{0xa0, 0x40, 0x0118},
{}
};
-static struct usb_action icm105a_50HZ[] = {
+static const struct usb_action icm105a_50HZ[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */
{0xaa, 0x0c, 0x0020}, /* 00,0c,20,aa */
@@ -3042,7 +3058,7 @@ static struct usb_action icm105a_50HZ[] = {
{0xa0, 0xff, 0x0020}, /* 00,20,ff,cc */
{}
};
-static struct usb_action icm105a_50HZScale[] = {
+static const struct usb_action icm105a_50HZScale[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */
{0xaa, 0x0c, 0x008c}, /* 00,0c,8c,aa */
@@ -3075,7 +3091,7 @@ static struct usb_action icm105a_50HZScale[] = {
{0xa0, 0xc0, 0x01a8}, /* 01,a8,c0,cc */
{}
};
-static struct usb_action icm105a_60HZ[] = {
+static const struct usb_action icm105a_60HZ[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */
{0xaa, 0x0c, 0x0004}, /* 00,0c,04,aa */
@@ -3106,7 +3122,7 @@ static struct usb_action icm105a_60HZ[] = {
{0xa0, 0xff, 0x0020}, /* 00,20,ff,cc */
{}
};
-static struct usb_action icm105a_60HZScale[] = {
+static const struct usb_action icm105a_60HZScale[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */
{0xaa, 0x0c, 0x0008}, /* 00,0c,08,aa */
@@ -3139,7 +3155,7 @@ static struct usb_action icm105a_60HZScale[] = {
{0xa0, 0xc0, 0x01a8}, /* 01,a8,c0,cc */
{}
};
-static struct usb_action icm105a_NoFliker[] = {
+static const struct usb_action icm105a_NoFliker[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */
{0xaa, 0x0c, 0x0004}, /* 00,0c,04,aa */
@@ -3170,7 +3186,7 @@ static struct usb_action icm105a_NoFliker[] = {
{0xa0, 0xff, 0x0020}, /* 00,20,ff,cc */
{}
};
-static struct usb_action icm105a_NoFlikerScale[] = {
+static const struct usb_action icm105a_NoFlikerScale[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */
{0xaa, 0x0c, 0x0004}, /* 00,0c,04,aa */
@@ -3204,7 +3220,7 @@ static struct usb_action icm105a_NoFlikerScale[] = {
{}
};
-static struct usb_action MC501CB_InitialScale[] = {
+static const struct usb_action MC501CB_InitialScale[] = {
{0xa0, 0x01, 0x0000}, /* 00,00,01,cc */
{0xa0, 0x00, 0x0002}, /* 00,02,00,cc */
{0xa0, 0x01, 0x0010}, /* 00,10,01,cc */
@@ -3324,7 +3340,7 @@ static struct usb_action MC501CB_InitialScale[] = {
{}
};
-static struct usb_action MC501CB_Initial[] = { /* 320x240 */
+static const struct usb_action MC501CB_Initial[] = { /* 320x240 */
{0xa0, 0x01, 0x0000}, /* 00,00,01,cc */
{0xa0, 0x10, 0x0002}, /* 00,02,10,cc */
{0xa0, 0x01, 0x0010}, /* 00,10,01,cc */
@@ -3443,7 +3459,7 @@ static struct usb_action MC501CB_Initial[] = { /* 320x240 */
{}
};
-static struct usb_action MC501CB_50HZ[] = {
+static const struct usb_action MC501CB_50HZ[] = {
{0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
{0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
{0xaa, 0x36, 0x001d}, /* 00,36,1D,aa */
@@ -3460,7 +3476,7 @@ static struct usb_action MC501CB_50HZ[] = {
{}
};
-static struct usb_action MC501CB_50HZScale[] = {
+static const struct usb_action MC501CB_50HZScale[] = {
{0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
{0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
{0xaa, 0x36, 0x003a}, /* 00,36,3A,aa */
@@ -3477,7 +3493,7 @@ static struct usb_action MC501CB_50HZScale[] = {
{}
};
-static struct usb_action MC501CB_60HZ[] = {
+static const struct usb_action MC501CB_60HZ[] = {
{0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
{0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
{0xaa, 0x36, 0x0018}, /* 00,36,18,aa */
@@ -3494,7 +3510,7 @@ static struct usb_action MC501CB_60HZ[] = {
{}
};
-static struct usb_action MC501CB_60HZScale[] = {
+static const struct usb_action MC501CB_60HZScale[] = {
{0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
{0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
{0xaa, 0x36, 0x0030}, /* 00,36,30,aa */
@@ -3511,7 +3527,7 @@ static struct usb_action MC501CB_60HZScale[] = {
{}
};
-static struct usb_action MC501CB_NoFliker[] = {
+static const struct usb_action MC501CB_NoFliker[] = {
{0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
{0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
{0xaa, 0x36, 0x0018}, /* 00,36,18,aa */
@@ -3528,7 +3544,7 @@ static struct usb_action MC501CB_NoFliker[] = {
{}
};
-static struct usb_action MC501CB_NoFlikerScale[] = {
+static const struct usb_action MC501CB_NoFlikerScale[] = {
{0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
{0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
{0xaa, 0x36, 0x0030}, /* 00,36,30,aa */
@@ -3541,7 +3557,7 @@ static struct usb_action MC501CB_NoFlikerScale[] = {
};
/* from zs211.inf - HKR,%OV7620%,Initial - 640x480 */
-static struct usb_action OV7620_mode0[] = {
+static const struct usb_action OV7620_mode0[] = {
{0xa0, 0x01, 0x0000}, /* 00,00,01,cc */
{0xa0, 0x40, 0x0002}, /* 00,02,40,cc */
#if 1 /*jfm*/
@@ -3616,7 +3632,7 @@ static struct usb_action OV7620_mode0[] = {
};
/* from zs211.inf - HKR,%OV7620%,InitialScale - 320x240 */
-static struct usb_action OV7620_mode1[] = {
+static const struct usb_action OV7620_mode1[] = {
{0xa0, 0x01, 0x0000}, /* 00,00,01,cc */
{0xa0, 0x50, 0x0002}, /* 00,02,50,cc */
{0xa0, 0x03, 0x0008}, /* 00,08,00,cc */ /* mx change? */
@@ -3687,7 +3703,7 @@ static struct usb_action OV7620_mode1[] = {
};
/* from zs211.inf - HKR,%OV7620%\AE,50HZ */
-static struct usb_action OV7620_50HZ[] = {
+static const struct usb_action OV7620_50HZ[] = {
{0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */
{0xdd, 0x00, 0x0100}, /* 00,01,00,dd */
{0xaa, 0x2b, 0x0096}, /* 00,2b,96,aa */
@@ -3706,7 +3722,7 @@ static struct usb_action OV7620_50HZ[] = {
};
/* from zs211.inf - HKR,%OV7620%\AE,60HZ */
-static struct usb_action OV7620_60HZ[] = {
+static const struct usb_action OV7620_60HZ[] = {
{0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ /* (bug in zs211.inf) */
{0xdd, 0x00, 0x0100}, /* 00,01,00,dd */
{0xaa, 0x2b, 0x0000}, /* 00,2b,00,aa */
@@ -3728,7 +3744,7 @@ static struct usb_action OV7620_60HZ[] = {
};
/* from zs211.inf - HKR,%OV7620%\AE,NoFliker */
-static struct usb_action OV7620_NoFliker[] = {
+static const struct usb_action OV7620_NoFliker[] = {
{0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ /* (bug in zs211.inf) */
{0xdd, 0x00, 0x0100}, /* 00,01,00,dd */
{0xaa, 0x2b, 0x0000}, /* 00,2b,00,aa */
@@ -3747,7 +3763,7 @@ static struct usb_action OV7620_NoFliker[] = {
{}
};
-static struct usb_action ov7630c_Initial[] = {
+static const struct usb_action ov7630c_Initial[] = {
{0xa0, 0x01, 0x0000},
{0xa0, 0x10, 0x0002},
{0xa0, 0x01, 0x0000},
@@ -3904,7 +3920,7 @@ static struct usb_action ov7630c_Initial[] = {
{}
};
-static struct usb_action ov7630c_InitialScale[] = {
+static const struct usb_action ov7630c_InitialScale[] = {
{0xa0, 0x01, 0x0000},
{0xa0, 0x00, 0x0002},
{0xa0, 0x03, 0x0008},
@@ -4061,7 +4077,7 @@ static struct usb_action ov7630c_InitialScale[] = {
{}
};
-static struct usb_action pas106b_Initial_com[] = {
+static const struct usb_action pas106b_Initial_com[] = {
/* Sream and Sensor specific */
{0xa1, 0x01, 0x0010}, /* CMOSSensorSelect */
/* System */
@@ -4075,7 +4091,7 @@ static struct usb_action pas106b_Initial_com[] = {
{}
};
-static struct usb_action pas106b_Initial[] = { /* 176x144 */
+static const struct usb_action pas106b_Initial[] = { /* 176x144 */
/* JPEG control */
{0xa0, 0x03, 0x0008}, /* ClockSetting */
/* Sream and Sensor specific */
@@ -4193,7 +4209,7 @@ static struct usb_action pas106b_Initial[] = { /* 176x144 */
{}
};
-static struct usb_action pas106b_InitialScale[] = { /* 352x288 */
+static const struct usb_action pas106b_InitialScale[] = { /* 352x288 */
/* JPEG control */
{0xa0, 0x03, 0x0008}, /* ClockSetting */
/* Sream and Sensor specific */
@@ -4316,7 +4332,7 @@ static struct usb_action pas106b_InitialScale[] = { /* 352x288 */
{0xa0, 0xff, 0x0018}, /* Frame adjust */
{}
};
-static struct usb_action pas106b_50HZ[] = {
+static const struct usb_action pas106b_50HZ[] = {
{0xa0, 0x00, 0x0190}, /* 01,90,00,cc */
{0xa0, 0x06, 0x0191}, /* 01,91,06,cc */
{0xa0, 0x54, 0x0192}, /* 01,92,54,cc */
@@ -4332,7 +4348,7 @@ static struct usb_action pas106b_50HZ[] = {
{0xa0, 0x04, 0x01a9}, /* 01,a9,04,cc */
{}
};
-static struct usb_action pas106b_60HZ[] = {
+static const struct usb_action pas106b_60HZ[] = {
{0xa0, 0x00, 0x0190}, /* 01,90,00,cc */
{0xa0, 0x06, 0x0191}, /* 01,91,06,cc */
{0xa0, 0x2e, 0x0192}, /* 01,92,2e,cc */
@@ -4348,7 +4364,7 @@ static struct usb_action pas106b_60HZ[] = {
{0xa0, 0x04, 0x01a9}, /* 01,a9,04,cc */
{}
};
-static struct usb_action pas106b_NoFliker[] = {
+static const struct usb_action pas106b_NoFliker[] = {
{0xa0, 0x00, 0x0190}, /* 01,90,00,cc */
{0xa0, 0x06, 0x0191}, /* 01,91,06,cc */
{0xa0, 0x50, 0x0192}, /* 01,92,50,cc */
@@ -4365,7 +4381,7 @@ static struct usb_action pas106b_NoFliker[] = {
{}
};
-static struct usb_action pb03303x_Initial[] = {
+static const struct usb_action pb03303x_Initial[] = {
{0xa0, 0x01, 0x0000},
{0xa0, 0x03, 0x0008},
{0xa0, 0x0a, 0x0010},
@@ -4511,7 +4527,7 @@ static struct usb_action pb03303x_Initial[] = {
{}
};
-static struct usb_action pb03303x_InitialScale[] = {
+static const struct usb_action pb03303x_InitialScale[] = {
{0xa0, 0x01, 0x0000},
{0xa0, 0x03, 0x0008},
{0xa0, 0x0a, 0x0010},
@@ -4659,7 +4675,7 @@ static struct usb_action pb03303x_InitialScale[] = {
{0xa0, 0x42, 0x0180},
{}
};
-static struct usb_action pb0330xx_Initial[] = {
+static const struct usb_action pb0330xx_Initial[] = {
{0xa1, 0x01, 0x0008},
{0xa1, 0x01, 0x0008},
{0xa0, 0x01, 0x0000},
@@ -4774,7 +4790,7 @@ static struct usb_action pb0330xx_Initial[] = {
{}
};
-static struct usb_action pb0330xx_InitialScale[] = {
+static const struct usb_action pb0330xx_InitialScale[] = {
{0xa1, 0x01, 0x0008},
{0xa1, 0x01, 0x0008},
{0xa0, 0x01, 0x0000},
@@ -4887,7 +4903,7 @@ static struct usb_action pb0330xx_InitialScale[] = {
/* {0xa0, 0x00, 0x0007}, */
{}
};
-static struct usb_action pb0330_50HZ[] = {
+static const struct usb_action pb0330_50HZ[] = {
{0xa0, 0x00, 0x0190}, /* 01,90,00,cc */
{0xa0, 0x07, 0x0191}, /* 01,91,07,cc */
{0xa0, 0xee, 0x0192}, /* 01,92,ee,cc */
@@ -4903,7 +4919,7 @@ static struct usb_action pb0330_50HZ[] = {
{0xa0, 0xc8, 0x001f}, /* 00,1f,c8,cc */
{}
};
-static struct usb_action pb0330_50HZScale[] = {
+static const struct usb_action pb0330_50HZScale[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xa0, 0x00, 0x0190}, /* 01,90,00,cc */
{0xa0, 0x07, 0x0191}, /* 01,91,07,cc */
@@ -4920,7 +4936,7 @@ static struct usb_action pb0330_50HZScale[] = {
{0xa0, 0xf8, 0x001f}, /* 00,1f,f8,cc */
{}
};
-static struct usb_action pb0330_60HZ[] = {
+static const struct usb_action pb0330_60HZ[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xa0, 0x00, 0x0190}, /* 01,90,00,cc */
{0xa0, 0x07, 0x0191}, /* 01,91,07,cc */
@@ -4937,7 +4953,7 @@ static struct usb_action pb0330_60HZ[] = {
{0xa0, 0x90, 0x001f}, /* 00,1f,90,cc */
{}
};
-static struct usb_action pb0330_60HZScale[] = {
+static const struct usb_action pb0330_60HZScale[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xa0, 0x00, 0x0190}, /* 01,90,00,cc */
{0xa0, 0x07, 0x0191}, /* 01,91,07,cc */
@@ -4954,7 +4970,7 @@ static struct usb_action pb0330_60HZScale[] = {
{0xa0, 0x90, 0x001f}, /* 00,1f,90,cc */
{}
};
-static struct usb_action pb0330_NoFliker[] = {
+static const struct usb_action pb0330_NoFliker[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xa0, 0x00, 0x0190}, /* 01,90,00,cc */
{0xa0, 0x07, 0x0191}, /* 01,91,07,cc */
@@ -4971,7 +4987,7 @@ static struct usb_action pb0330_NoFliker[] = {
{0xa0, 0x90, 0x001f}, /* 00,1f,90,cc */
{}
};
-static struct usb_action pb0330_NoFlikerScale[] = {
+static const struct usb_action pb0330_NoFlikerScale[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xa0, 0x00, 0x0190}, /* 01,90,00,cc */
{0xa0, 0x07, 0x0191}, /* 01,91,07,cc */
@@ -4990,7 +5006,7 @@ static struct usb_action pb0330_NoFlikerScale[] = {
};
/* from oem9.inf - HKR,%PO2030%,Initial - 640x480 - (close to CS2102) */
-static struct usb_action PO2030_mode0[] = {
+static const struct usb_action PO2030_mode0[] = {
{0xa0, 0x01, 0x0000}, /* 00,00,01,cc */
{0xa0, 0x04, 0x0002}, /* 00,02,04,cc */
{0xa0, 0x01, 0x0010}, /* 00,10,01,cc */
@@ -5067,7 +5083,7 @@ static struct usb_action PO2030_mode0[] = {
};
/* from oem9.inf - HKR,%PO2030%,InitialScale - 320x240 */
-static struct usb_action PO2030_mode1[] = {
+static const struct usb_action PO2030_mode1[] = {
{0xa0, 0x01, 0x0000}, /* 00,00,01,cc */
{0xa0, 0x10, 0x0002}, /* 00,02,10,cc */
{0xa0, 0x01, 0x0010}, /* 00,10,01,cc */
@@ -5143,7 +5159,7 @@ static struct usb_action PO2030_mode1[] = {
{}
};
-static struct usb_action PO2030_50HZ[] = {
+static const struct usb_action PO2030_50HZ[] = {
{0xaa, 0x8d, 0x0008}, /* 00,8d,08,aa */
{0xaa, 0x1a, 0x0001}, /* 00,1a,01,aa */
{0xaa, 0x1b, 0x000a}, /* 00,1b,0a,aa */
@@ -5165,7 +5181,7 @@ static struct usb_action PO2030_50HZ[] = {
{}
};
-static struct usb_action PO2030_60HZ[] = {
+static const struct usb_action PO2030_60HZ[] = {
{0xaa, 0x8d, 0x0008}, /* 00,8d,08,aa */
{0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa */
{0xaa, 0x1b, 0x00de}, /* 00,1b,de,aa */
@@ -5187,7 +5203,7 @@ static struct usb_action PO2030_60HZ[] = {
{}
};
-static struct usb_action PO2030_NoFliker[] = {
+static const struct usb_action PO2030_NoFliker[] = {
{0xa0, 0x02, 0x0180}, /* 01,80,02,cc */
{0xaa, 0x8d, 0x000d}, /* 00,8d,0d,aa */
{0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa */
@@ -5199,7 +5215,7 @@ static struct usb_action PO2030_NoFliker[] = {
};
/* TEST */
-static struct usb_action tas5130CK_Initial[] = {
+static const struct usb_action tas5130CK_Initial[] = {
{0xa0, 0x01, 0x0000},
{0xa0, 0x01, 0x003b},
{0xa0, 0x0e, 0x003a},
@@ -5402,7 +5418,7 @@ static struct usb_action tas5130CK_Initial[] = {
{}
};
-static struct usb_action tas5130CK_InitialScale[] = {
+static const struct usb_action tas5130CK_InitialScale[] = {
{0xa0, 0x01, 0x0000},
{0xa0, 0x01, 0x003b},
{0xa0, 0x0e, 0x003a},
@@ -5610,7 +5626,7 @@ static struct usb_action tas5130CK_InitialScale[] = {
{}
};
-static struct usb_action tas5130cxx_Initial[] = {
+static const struct usb_action tas5130cxx_Initial[] = {
{0xa0, 0x01, 0x0000},
{0xa0, 0x50, 0x0002},
{0xa0, 0x03, 0x0008},
@@ -5699,7 +5715,7 @@ static struct usb_action tas5130cxx_Initial[] = {
{0xa0, 0x42, 0x0180},
{}
};
-static struct usb_action tas5130cxx_InitialScale[] = {
+static const struct usb_action tas5130cxx_InitialScale[] = {
{0xa0, 0x01, 0x0000},
{0xa0, 0x01, 0x0000},
{0xa0, 0x40, 0x0002},
@@ -5789,7 +5805,7 @@ static struct usb_action tas5130cxx_InitialScale[] = {
{0xa0, 0x42, 0x0180},
{}
};
-static struct usb_action tas5130cxx_50HZ[] = {
+static const struct usb_action tas5130cxx_50HZ[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */
{0xaa, 0xa4, 0x0063}, /* 00,a4,63,aa */
@@ -5812,7 +5828,7 @@ static struct usb_action tas5130cxx_50HZ[] = {
{0xa0, 0x03, 0x009f}, /* 00,9f,03,cc */
{}
};
-static struct usb_action tas5130cxx_50HZScale[] = {
+static const struct usb_action tas5130cxx_50HZScale[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */
{0xaa, 0xa4, 0x0077}, /* 00,a4,77,aa */
@@ -5835,7 +5851,7 @@ static struct usb_action tas5130cxx_50HZScale[] = {
{0xa0, 0x03, 0x009f}, /* 00,9f,03,cc */
{}
};
-static struct usb_action tas5130cxx_60HZ[] = {
+static const struct usb_action tas5130cxx_60HZ[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */
{0xaa, 0xa4, 0x0036}, /* 00,a4,36,aa */
@@ -5858,7 +5874,7 @@ static struct usb_action tas5130cxx_60HZ[] = {
{0xa0, 0x03, 0x009f}, /* 00,9f,03,cc */
{}
};
-static struct usb_action tas5130cxx_60HZScale[] = {
+static const struct usb_action tas5130cxx_60HZScale[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */
{0xaa, 0xa4, 0x0077}, /* 00,a4,77,aa */
@@ -5881,7 +5897,7 @@ static struct usb_action tas5130cxx_60HZScale[] = {
{0xa0, 0x03, 0x009f}, /* 00,9f,03,cc */
{}
};
-static struct usb_action tas5130cxx_NoFliker[] = {
+static const struct usb_action tas5130cxx_NoFliker[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */
{0xaa, 0xa4, 0x0040}, /* 00,a4,40,aa */
@@ -5905,7 +5921,7 @@ static struct usb_action tas5130cxx_NoFliker[] = {
{}
};
-static struct usb_action tas5130cxx_NoFlikerScale[] = {
+static const struct usb_action tas5130cxx_NoFlikerScale[] = {
{0xa0, 0x00, 0x0019}, /* 00,19,00,cc */
{0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */
{0xaa, 0xa4, 0x0090}, /* 00,a4,90,aa */
@@ -5929,7 +5945,7 @@ static struct usb_action tas5130cxx_NoFlikerScale[] = {
{}
};
-static struct usb_action tas5130c_vf0250_Initial[] = {
+static const struct usb_action tas5130c_vf0250_Initial[] = {
{0xa0, 0x01, 0x0000}, /* 00,00,01,cc, */
{0xa0, 0x02, 0x0008}, /* 00,08,02,cc, */
{0xa0, 0x01, 0x0010}, /* 00,10,01,cc, */
@@ -5993,7 +6009,7 @@ static struct usb_action tas5130c_vf0250_Initial[] = {
{}
};
-static struct usb_action tas5130c_vf0250_InitialScale[] = {
+static const struct usb_action tas5130c_vf0250_InitialScale[] = {
{0xa0, 0x01, 0x0000}, /* 00,00,01,cc, */
{0xa0, 0x02, 0x0008}, /* 00,08,02,cc, */
{0xa0, 0x01, 0x0010}, /* 00,10,01,cc, */
@@ -6057,7 +6073,7 @@ static struct usb_action tas5130c_vf0250_InitialScale[] = {
{}
};
/* "50HZ" light frequency banding filter */
-static struct usb_action tas5130c_vf0250_50HZ[] = {
+static const struct usb_action tas5130c_vf0250_50HZ[] = {
{0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
{0xaa, 0x83, 0x0001}, /* 00,83,01,aa */
{0xaa, 0x84, 0x00aa}, /* 00,84,aa,aa */
@@ -6082,7 +6098,7 @@ static struct usb_action tas5130c_vf0250_50HZ[] = {
};
/* "50HZScale" light frequency banding filter */
-static struct usb_action tas5130c_vf0250_50HZScale[] = {
+static const struct usb_action tas5130c_vf0250_50HZScale[] = {
{0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
{0xaa, 0x83, 0x0003}, /* 00,83,03,aa */
{0xaa, 0x84, 0x0054}, /* 00,84,54,aa */
@@ -6107,7 +6123,7 @@ static struct usb_action tas5130c_vf0250_50HZScale[] = {
};
/* "60HZ" light frequency banding filter */
-static struct usb_action tas5130c_vf0250_60HZ[] = {
+static const struct usb_action tas5130c_vf0250_60HZ[] = {
{0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
{0xaa, 0x83, 0x0001}, /* 00,83,01,aa */
{0xaa, 0x84, 0x0062}, /* 00,84,62,aa */
@@ -6132,7 +6148,7 @@ static struct usb_action tas5130c_vf0250_60HZ[] = {
};
/* "60HZScale" light frequency banding ilter */
-static struct usb_action tas5130c_vf0250_60HZScale[] = {
+static const struct usb_action tas5130c_vf0250_60HZScale[] = {
{0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
{0xaa, 0x83, 0x0002}, /* 00,83,02,aa */
{0xaa, 0x84, 0x00c4}, /* 00,84,c4,aa */
@@ -6157,7 +6173,7 @@ static struct usb_action tas5130c_vf0250_60HZScale[] = {
};
/* "NoFliker" light frequency banding flter */
-static struct usb_action tas5130c_vf0250_NoFliker[] = {
+static const struct usb_action tas5130c_vf0250_NoFliker[] = {
{0xa0, 0x0c, 0x0100}, /* 01,00,0c,cc, */
{0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
{0xaa, 0x83, 0x0000}, /* 00,83,00,aa */
@@ -6180,7 +6196,7 @@ static struct usb_action tas5130c_vf0250_NoFliker[] = {
};
/* "NoFlikerScale" light frequency banding filter */
-static struct usb_action tas5130c_vf0250_NoFlikerScale[] = {
+static const struct usb_action tas5130c_vf0250_NoFlikerScale[] = {
{0xa0, 0x0c, 0x0100}, /* 01,00,0c,cc, */
{0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
{0xaa, 0x83, 0x0000}, /* 00,83,00,aa */
@@ -6276,7 +6292,7 @@ static __u8 i2c_write(struct usb_device *dev,
}
static void usb_exchange(struct usb_device *dev,
- struct usb_action *action)
+ const struct usb_action *action)
{
__u8 buffread;
@@ -6308,12 +6324,12 @@ static void setmatrix(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
int i;
- __u8 *matrix;
- static __u8 gc0305_matrix[9] =
+ const __u8 *matrix;
+ static const __u8 gc0305_matrix[9] =
{0x50, 0xf8, 0xf8, 0xf8, 0x50, 0xf8, 0xf8, 0xf8, 0x50};
- static __u8 ov7620_matrix[9] =
+ static const __u8 ov7620_matrix[9] =
{0x58, 0xf4, 0xf4, 0xf4, 0x58, 0xf4, 0xf4, 0xf4, 0x58};
- static __u8 po2030_matrix[9] =
+ static const __u8 po2030_matrix[9] =
{0x60, 0xf0, 0xf0, 0xf0, 0x60, 0xf0, 0xf0, 0xf0, 0x60};
switch (sd->sensor) {
@@ -6365,7 +6381,7 @@ static void setsharpness(struct gspca_dev *gspca_dev)
struct usb_device *dev = gspca_dev->dev;
int sharpness;
__u8 retbyte;
- static __u8 sharpness_tb[][2] = {
+ static const __u8 sharpness_tb[][2] = {
{0x02, 0x03},
{0x04, 0x07},
{0x08, 0x0f},
@@ -6384,59 +6400,59 @@ static void setcontrast(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
struct usb_device *dev = gspca_dev->dev;
- __u8 *Tgamma, *Tgradient;
+ const __u8 *Tgamma, *Tgradient;
int g, i, k;
- static __u8 kgamma_tb[16] = /* delta for contrast */
+ static const __u8 kgamma_tb[16] = /* delta for contrast */
{0x15, 0x0d, 0x0a, 0x09, 0x08, 0x08, 0x08, 0x08,
0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08};
- static __u8 kgrad_tb[16] =
+ static const __u8 kgrad_tb[16] =
{0x1b, 0x06, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x04};
- static __u8 Tgamma_1[16] =
+ static const __u8 Tgamma_1[16] =
{0x00, 0x00, 0x03, 0x0d, 0x1b, 0x2e, 0x45, 0x5f,
0x79, 0x93, 0xab, 0xc1, 0xd4, 0xe5, 0xf3, 0xff};
- static __u8 Tgradient_1[16] =
+ static const __u8 Tgradient_1[16] =
{0x00, 0x01, 0x05, 0x0b, 0x10, 0x15, 0x18, 0x1a,
0x1a, 0x18, 0x16, 0x14, 0x12, 0x0f, 0x0d, 0x06};
- static __u8 Tgamma_2[16] =
+ static const __u8 Tgamma_2[16] =
{0x01, 0x0c, 0x1f, 0x3a, 0x53, 0x6d, 0x85, 0x9c,
0xb0, 0xc2, 0xd1, 0xde, 0xe9, 0xf2, 0xf9, 0xff};
- static __u8 Tgradient_2[16] =
+ static const __u8 Tgradient_2[16] =
{0x05, 0x0f, 0x16, 0x1a, 0x19, 0x19, 0x17, 0x15,
0x12, 0x10, 0x0e, 0x0b, 0x09, 0x08, 0x06, 0x03};
- static __u8 Tgamma_3[16] =
+ static const __u8 Tgamma_3[16] =
{0x04, 0x16, 0x30, 0x4e, 0x68, 0x81, 0x98, 0xac,
0xbe, 0xcd, 0xda, 0xe4, 0xed, 0xf5, 0xfb, 0xff};
- static __u8 Tgradient_3[16] =
+ static const __u8 Tgradient_3[16] =
{0x0c, 0x16, 0x1b, 0x1c, 0x19, 0x18, 0x15, 0x12,
0x10, 0x0d, 0x0b, 0x09, 0x08, 0x06, 0x05, 0x03};
- static __u8 Tgamma_4[16] =
+ static const __u8 Tgamma_4[16] =
{0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8,
0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff};
- static __u8 Tgradient_4[16] =
+ static const __u8 Tgradient_4[16] =
{0x26, 0x22, 0x20, 0x1c, 0x16, 0x13, 0x10, 0x0d,
0x0b, 0x09, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02};
- static __u8 Tgamma_5[16] =
+ static const __u8 Tgamma_5[16] =
{0x20, 0x4b, 0x6e, 0x8d, 0xa3, 0xb5, 0xc5, 0xd2,
0xdc, 0xe5, 0xec, 0xf2, 0xf6, 0xfa, 0xfd, 0xff};
- static __u8 Tgradient_5[16] =
+ static const __u8 Tgradient_5[16] =
{0x37, 0x26, 0x20, 0x1a, 0x14, 0x10, 0x0e, 0x0b,
0x09, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x02};
- static __u8 Tgamma_6[16] = /* ?? was gamma 5 */
+ static const __u8 Tgamma_6[16] = /* ?? was gamma 5 */
{0x24, 0x44, 0x64, 0x84, 0x9d, 0xb2, 0xc4, 0xd3,
0xe0, 0xeb, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff};
- static __u8 Tgradient_6[16] =
+ static const __u8 Tgradient_6[16] =
{0x18, 0x20, 0x20, 0x1c, 0x16, 0x13, 0x10, 0x0e,
0x0b, 0x09, 0x07, 0x00, 0x00, 0x00, 0x00, 0x01};
- static __u8 *gamma_tb[] = {
- 0, Tgamma_1, Tgamma_2,
+ static const __u8 *gamma_tb[] = {
+ NULL, Tgamma_1, Tgamma_2,
Tgamma_3, Tgamma_4, Tgamma_5, Tgamma_6
};
- static __u8 *gradient_tb[] = {
- 0, Tgradient_1, Tgradient_2,
+ static const __u8 *gradient_tb[] = {
+ NULL, Tgradient_1, Tgradient_2,
Tgradient_3, Tgradient_4, Tgradient_5, Tgradient_6
};
-#ifdef VIDEO_ADV_DEBUG
+#ifdef CONFIG_VIDEO_ADV_DEBUG
__u8 v[16];
#endif
@@ -6454,7 +6470,7 @@ static void setcontrast(struct gspca_dev *gspca_dev)
else if (g <= 0)
g = 1;
reg_w(dev, g, 0x0120 + i); /* gamma */
-#ifdef VIDEO_ADV_DEBUG
+#ifdef CONFIG_VIDEO_ADV_DEBUG
if (gspca_debug & D_CONF)
v[i] = g;
#endif
@@ -6474,7 +6490,7 @@ static void setcontrast(struct gspca_dev *gspca_dev)
g = 1;
}
reg_w(dev, g, 0x0130 + i); /* gradient */
-#ifdef VIDEO_ADV_DEBUG
+#ifdef CONFIG_VIDEO_ADV_DEBUG
if (gspca_debug & D_CONF)
v[i] = g;
#endif
@@ -6533,8 +6549,8 @@ static int setlightfreq(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
int i, mode;
- struct usb_action *zc3_freq;
- static struct usb_action *freq_tb[SENSOR_MAX][6] = {
+ const struct usb_action *zc3_freq;
+ static const struct usb_action *freq_tb[SENSOR_MAX][6] = {
/* SENSOR_CS2102 0 */
{cs2102_NoFliker, cs2102_NoFlikerScale,
cs2102_50HZ, cs2102_50HZScale,
@@ -6548,21 +6564,21 @@ static int setlightfreq(struct gspca_dev *gspca_dev)
gc0305_50HZ, gc0305_50HZ,
gc0305_60HZ, gc0305_60HZ},
/* SENSOR_HDCS2020 3 */
- {0, 0,
- 0, 0,
- 0, 0},
+ {NULL, NULL,
+ NULL, NULL,
+ NULL, NULL},
/* SENSOR_HDCS2020b 4 */
{hdcs2020b_NoFliker, hdcs2020b_NoFliker,
hdcs2020b_50HZ, hdcs2020b_50HZ,
hdcs2020b_60HZ, hdcs2020b_60HZ},
/* SENSOR_HV7131B 5 */
- {0, 0,
- 0, 0,
- 0, 0},
+ {NULL, NULL,
+ NULL, NULL,
+ NULL, NULL},
/* SENSOR_HV7131C 6 */
- {0, 0,
- 0, 0,
- 0, 0},
+ {NULL, NULL,
+ NULL, NULL,
+ NULL, NULL},
/* SENSOR_ICM105A 7 */
{icm105a_NoFliker, icm105a_NoFlikerScale,
icm105a_50HZ, icm105a_50HZScale,
@@ -6576,9 +6592,9 @@ static int setlightfreq(struct gspca_dev *gspca_dev)
OV7620_50HZ, OV7620_50HZ,
OV7620_60HZ, OV7620_60HZ},
/* SENSOR_OV7630C 10 */
- {0, 0,
- 0, 0,
- 0, 0},
+ {NULL, NULL,
+ NULL, NULL,
+ NULL, NULL},
/* SENSOR_PAS106 11 */
{pas106b_NoFliker, pas106b_NoFliker,
pas106b_50HZ, pas106b_50HZ,
@@ -6606,11 +6622,11 @@ static int setlightfreq(struct gspca_dev *gspca_dev)
};
i = sd->lightfreq * 2;
- mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].mode;
+ mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv;
if (!mode)
i++; /* 640x480 */
zc3_freq = freq_tb[(int) sd->sensor][i];
- if (zc3_freq != 0) {
+ if (zc3_freq != NULL) {
usb_exchange(gspca_dev->dev, zc3_freq);
switch (sd->sensor) {
case SENSOR_GC0305:
@@ -6956,7 +6972,7 @@ static int sd_config(struct gspca_dev *gspca_dev,
int sensor;
__u8 bsensor;
int vga = 1; /* 1: vga, 0: sif */
- static __u8 gamma[SENSOR_MAX] = {
+ static const __u8 gamma[SENSOR_MAX] = {
5, /* SENSOR_CS2102 0 */
5, /* SENSOR_CS2102K 1 */
4, /* SENSOR_GC0305 2 */
@@ -7149,10 +7165,10 @@ static void sd_start(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
struct usb_device *dev = gspca_dev->dev;
- struct usb_action *zc3_init;
+ const struct usb_action *zc3_init;
int mode;
__u8 retbyte;
- static struct usb_action *init_tb[SENSOR_MAX][2] = {
+ static const struct usb_action *init_tb[SENSOR_MAX][2] = {
{cs2102_InitialScale, cs2102_Initial}, /* 0 */
{cs2102K_InitialScale, cs2102K_Initial}, /* 1 */
{gc0305_Initial, gc0305_InitialScale}, /* 2 */
@@ -7174,7 +7190,7 @@ static void sd_start(struct gspca_dev *gspca_dev)
/* 16 */
};
- mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].mode;
+ mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv;
zc3_init = init_tb[(int) sd->sensor][mode];
switch (sd->sensor) {
case SENSOR_HV7131B:
@@ -7463,13 +7479,13 @@ static int sd_querymenu(struct gspca_dev *gspca_dev,
case V4L2_CID_POWER_LINE_FREQUENCY:
switch (menu->index) {
case 0: /* V4L2_CID_POWER_LINE_FREQUENCY_DISABLED */
- strcpy(menu->name, "NoFliker");
+ strcpy((char *) menu->name, "NoFliker");
return 0;
case 1: /* V4L2_CID_POWER_LINE_FREQUENCY_50HZ */
- strcpy(menu->name, "50 Hz");
+ strcpy((char *) menu->name, "50 Hz");
return 0;
case 2: /* V4L2_CID_POWER_LINE_FREQUENCY_60HZ */
- strcpy(menu->name, "60 Hz");
+ strcpy((char *) menu->name, "60 Hz");
return 0;
}
break;
@@ -7477,7 +7493,7 @@ static int sd_querymenu(struct gspca_dev *gspca_dev,
return -EINVAL;
}
-static struct sd_desc sd_desc = {
+static const struct sd_desc sd_desc = {
.name = MODULE_NAME,
.ctrls = sd_ctrls,
.nctrls = sizeof sd_ctrls / sizeof sd_ctrls[0],
@@ -7492,7 +7508,7 @@ static struct sd_desc sd_desc = {
};
#define DVNM(name) .driver_info = (kernel_ulong_t) name
-static __devinitdata struct usb_device_id device_table[] = {
+static const __devinitdata struct usb_device_id device_table[] = {
{USB_DEVICE(0x041e, 0x041e), DVNM("Creative WebCam Live!")},
{USB_DEVICE(0x041e, 0x4017), DVNM("Creative Webcam Mobile PD1090")},
{USB_DEVICE(0x041e, 0x401c), DVNM("Creative NX")},