aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/vc032x.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-07-04 10:16:16 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 06:16:53 -0400
commita5ae2062252e697d38e53dbbeb91460252208914 (patch)
tree38706e9f36e2d93cd3dee8eea639bb74a17b3efa /drivers/media/video/gspca/vc032x.c
parent54ab92ca05550550bcec2462de2605f35d079b66 (diff)
V4L/DVB (8195): gspca: Input buffer overwritten in spca561 + cleanup code.
spca561: Input buffer may be changed on reg write. (all sd): Cleanup code, 'const' added. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/gspca/vc032x.c')
-rw-r--r--drivers/media/video/gspca/vc032x.c80
1 files changed, 40 insertions, 40 deletions
diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c
index 8b5f6d17d2a5..4144e11c60bb 100644
--- a/drivers/media/video/gspca/vc032x.c
+++ b/drivers/media/video/gspca/vc032x.c
@@ -24,8 +24,8 @@
24 24
25#include "gspca.h" 25#include "gspca.h"
26 26
27#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 0) 27#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 4)
28static const char version[] = "2.1.0"; 28static const char version[] = "2.1.4";
29 29
30MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>"); 30MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>");
31MODULE_DESCRIPTION("GSPCA/VC032X USB Camera Driver"); 31MODULE_DESCRIPTION("GSPCA/VC032X USB Camera Driver");
@@ -97,7 +97,7 @@ static struct cam_mode vc0323_mode[] = {
97 {V4L2_PIX_FMT_JPEG, 640, 480, 0}, 97 {V4L2_PIX_FMT_JPEG, 640, 480, 0},
98}; 98};
99 99
100static __u8 mi1310_socinitVGA_JPG[][4] = { 100static const __u8 mi1310_socinitVGA_JPG[][4] = {
101 {0xb0, 0x03, 0x19, 0xcc}, 101 {0xb0, 0x03, 0x19, 0xcc},
102 {0xb0, 0x04, 0x02, 0xcc}, 102 {0xb0, 0x04, 0x02, 0xcc},
103 {0xb3, 0x00, 0x64, 0xcc}, 103 {0xb3, 0x00, 0x64, 0xcc},
@@ -249,7 +249,7 @@ static __u8 mi1310_socinitVGA_JPG[][4] = {
249 {0x03, 0x03, 0xc0, 0xbb}, 249 {0x03, 0x03, 0xc0, 0xbb},
250 {}, 250 {},
251}; 251};
252static __u8 mi1310_socinitQVGA_JPG[][4] = { 252static const __u8 mi1310_socinitQVGA_JPG[][4] = {
253 {0xb0, 0x03, 0x19, 0xcc}, {0xb0, 0x04, 0x02, 0xcc}, 253 {0xb0, 0x03, 0x19, 0xcc}, {0xb0, 0x04, 0x02, 0xcc},
254 {0xb3, 0x00, 0x64, 0xcc}, {0xb3, 0x00, 0x65, 0xcc}, 254 {0xb3, 0x00, 0x64, 0xcc}, {0xb3, 0x00, 0x65, 0xcc},
255 {0xb3, 0x05, 0x00, 0xcc}, {0xb3, 0x06, 0x00, 0xcc}, 255 {0xb3, 0x05, 0x00, 0xcc}, {0xb3, 0x06, 0x00, 0xcc},
@@ -323,14 +323,14 @@ static __u8 mi1310_socinitQVGA_JPG[][4] = {
323 {}, 323 {},
324}; 324};
325 325
326static __u8 mi1320_gamma[17] = { 326static const __u8 mi1320_gamma[17] = {
327 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, 327 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8,
328 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff 328 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff
329}; 329};
330static __u8 mi1320_matrix[9] = { 330static const __u8 mi1320_matrix[9] = {
331 0x54, 0xda, 0x06, 0xf1, 0x50, 0xf4, 0xf7, 0xea, 0x52 331 0x54, 0xda, 0x06, 0xf1, 0x50, 0xf4, 0xf7, 0xea, 0x52
332}; 332};
333static __u8 mi1320_initVGA_data[][4] = { 333static const __u8 mi1320_initVGA_data[][4] = {
334 {0xb3, 0x01, 0x01, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, 334 {0xb3, 0x01, 0x01, 0xcc}, {0x00, 0x00, 0x33, 0xdd},
335 {0xb0, 0x03, 0x19, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, 335 {0xb0, 0x03, 0x19, 0xcc}, {0x00, 0x00, 0x33, 0xdd},
336 {0xb0, 0x04, 0x02, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, 336 {0xb0, 0x04, 0x02, 0xcc}, {0x00, 0x00, 0x33, 0xdd},
@@ -409,7 +409,7 @@ static __u8 mi1320_initVGA_data[][4] = {
409 {0xb3, 0x5c, 0x01, 0xcc}, {0xb3, 0x01, 0x41, 0xcc}, 409 {0xb3, 0x5c, 0x01, 0xcc}, {0xb3, 0x01, 0x41, 0xcc},
410 {} 410 {}
411}; 411};
412static __u8 mi1320_initQVGA_data[][4] = { 412static const __u8 mi1320_initQVGA_data[][4] = {
413 {0xb3, 0x01, 0x01, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, 413 {0xb3, 0x01, 0x01, 0xcc}, {0x00, 0x00, 0x33, 0xdd},
414 {0xb0, 0x03, 0x19, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, 414 {0xb0, 0x03, 0x19, 0xcc}, {0x00, 0x00, 0x33, 0xdd},
415 {0xb0, 0x04, 0x02, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, 415 {0xb0, 0x04, 0x02, 0xcc}, {0x00, 0x00, 0x33, 0xdd},
@@ -478,15 +478,15 @@ static __u8 mi1320_initQVGA_data[][4] = {
478 {} 478 {}
479}; 479};
480 480
481static __u8 po3130_gamma[17] = { 481static const __u8 po3130_gamma[17] = {
482 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, 482 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8,
483 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff 483 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff
484}; 484};
485static __u8 po3130_matrix[9] = { 485static const __u8 po3130_matrix[9] = {
486 0x5f, 0xec, 0xf5, 0xf1, 0x5a, 0xf5, 0xf1, 0xec, 0x63 486 0x5f, 0xec, 0xf5, 0xf1, 0x5a, 0xf5, 0xf1, 0xec, 0x63
487}; 487};
488 488
489static __u8 po3130_initVGA_data[][4] = { 489static const __u8 po3130_initVGA_data[][4] = {
490 {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, 490 {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc},
491 {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x01, 0xcc}, 491 {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x01, 0xcc},
492 {0xb3, 0x00, 0x04, 0xcc}, {0xb3, 0x00, 0x24, 0xcc}, 492 {0xb3, 0x00, 0x04, 0xcc}, {0xb3, 0x00, 0x24, 0xcc},
@@ -569,7 +569,7 @@ static __u8 po3130_initVGA_data[][4] = {
569 {0xb3, 0x5c, 0x00, 0xcc}, {0xb3, 0x01, 0x41, 0xcc}, 569 {0xb3, 0x5c, 0x00, 0xcc}, {0xb3, 0x01, 0x41, 0xcc},
570 {} 570 {}
571}; 571};
572static __u8 po3130_rundata[][4] = { 572static const __u8 po3130_rundata[][4] = {
573 {0x00, 0x47, 0x45, 0xaa}, {0x00, 0x48, 0x9b, 0xaa}, 573 {0x00, 0x47, 0x45, 0xaa}, {0x00, 0x48, 0x9b, 0xaa},
574 {0x00, 0x49, 0x3a, 0xaa}, {0x00, 0x4a, 0x01, 0xaa}, 574 {0x00, 0x49, 0x3a, 0xaa}, {0x00, 0x4a, 0x01, 0xaa},
575 {0x00, 0x44, 0x40, 0xaa}, 575 {0x00, 0x44, 0x40, 0xaa},
@@ -584,7 +584,7 @@ static __u8 po3130_rundata[][4] = {
584 {} 584 {}
585}; 585};
586 586
587static __u8 po3130_initQVGA_data[][4] = { 587static const __u8 po3130_initQVGA_data[][4] = {
588 {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, 588 {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc},
589 {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x09, 0xcc}, 589 {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x09, 0xcc},
590 {0xb3, 0x00, 0x04, 0xcc}, {0xb3, 0x00, 0x24, 0xcc}, 590 {0xb3, 0x00, 0x04, 0xcc}, {0xb3, 0x00, 0x24, 0xcc},
@@ -670,16 +670,16 @@ static __u8 po3130_initQVGA_data[][4] = {
670 {} 670 {}
671}; 671};
672 672
673static __u8 hv7131r_gamma[17] = { 673static const __u8 hv7131r_gamma[17] = {
674/* 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, 674/* 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8,
675 * 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff */ 675 * 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff */
676 0x04, 0x1a, 0x36, 0x55, 0x6f, 0x87, 0x9d, 0xb0, 0xc1, 676 0x04, 0x1a, 0x36, 0x55, 0x6f, 0x87, 0x9d, 0xb0, 0xc1,
677 0xcf, 0xda, 0xe4, 0xec, 0xf3, 0xf8, 0xfd, 0xff 677 0xcf, 0xda, 0xe4, 0xec, 0xf3, 0xf8, 0xfd, 0xff
678}; 678};
679static __u8 hv7131r_matrix[9] = { 679static const __u8 hv7131r_matrix[9] = {
680 0x5f, 0xec, 0xf5, 0xf1, 0x5a, 0xf5, 0xf1, 0xec, 0x63 680 0x5f, 0xec, 0xf5, 0xf1, 0x5a, 0xf5, 0xf1, 0xec, 0x63
681}; 681};
682static __u8 hv7131r_initVGA_data[][4] = { 682static const __u8 hv7131r_initVGA_data[][4] = {
683 {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, 683 {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc},
684 {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x01, 0xcc}, 684 {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x01, 0xcc},
685 {0xb3, 0x00, 0x24, 0xcc}, 685 {0xb3, 0x00, 0x24, 0xcc},
@@ -722,7 +722,7 @@ static __u8 hv7131r_initVGA_data[][4] = {
722 {} 722 {}
723}; 723};
724 724
725static __u8 hv7131r_initQVGA_data[][4] = { 725static const __u8 hv7131r_initQVGA_data[][4] = {
726 {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, 726 {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc},
727 {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x01, 0xcc}, 727 {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x01, 0xcc},
728 {0xb3, 0x00, 0x24, 0xcc}, 728 {0xb3, 0x00, 0x24, 0xcc},
@@ -777,14 +777,14 @@ static __u8 hv7131r_initQVGA_data[][4] = {
777 {} 777 {}
778}; 778};
779 779
780static __u8 ov7660_gamma[17] = { 780static const __u8 ov7660_gamma[17] = {
781 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, 781 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8,
782 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff 782 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff
783}; 783};
784static __u8 ov7660_matrix[9] = { 784static const __u8 ov7660_matrix[9] = {
785 0x5a, 0xf0, 0xf6, 0xf3, 0x57, 0xf6, 0xf3, 0xef, 0x62 785 0x5a, 0xf0, 0xf6, 0xf3, 0x57, 0xf6, 0xf3, 0xef, 0x62
786}; 786};
787static __u8 ov7660_initVGA_data[][4] = { 787static const __u8 ov7660_initVGA_data[][4] = {
788 {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, 788 {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc},
789 {0x00, 0x00, 0x50, 0xdd}, 789 {0x00, 0x00, 0x50, 0xdd},
790 {0xb0, 0x03, 0x01, 0xcc}, 790 {0xb0, 0x03, 0x01, 0xcc},
@@ -842,7 +842,7 @@ static __u8 ov7660_initVGA_data[][4] = {
842 {0x00, 0x29, 0x3c, 0xaa}, {0xb3, 0x01, 0x45, 0xcc}, 842 {0x00, 0x29, 0x3c, 0xaa}, {0xb3, 0x01, 0x45, 0xcc},
843 {} 843 {}
844}; 844};
845static __u8 ov7660_initQVGA_data[][4] = { 845static const __u8 ov7660_initQVGA_data[][4] = {
846 {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, 846 {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc},
847 {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x01, 0xcc}, 847 {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x01, 0xcc},
848 {0xb3, 0x00, 0x21, 0xcc}, {0xb3, 0x00, 0x26, 0xcc}, 848 {0xb3, 0x00, 0x21, 0xcc}, {0xb3, 0x00, 0x26, 0xcc},
@@ -911,26 +911,26 @@ static __u8 ov7660_initQVGA_data[][4] = {
911 {0x00, 0x00, 0x00, 0x00} 911 {0x00, 0x00, 0x00, 0x00}
912}; 912};
913 913
914static __u8 ov7660_50HZ[][4] = { 914static const __u8 ov7660_50HZ[][4] = {
915 {0x00, 0x3b, 0x08, 0xaa}, 915 {0x00, 0x3b, 0x08, 0xaa},
916 {0x00, 0x9d, 0x40, 0xaa}, 916 {0x00, 0x9d, 0x40, 0xaa},
917 {0x00, 0x13, 0xa7, 0xaa}, 917 {0x00, 0x13, 0xa7, 0xaa},
918 {0x00, 0x00, 0x00, 0x00} 918 {0x00, 0x00, 0x00, 0x00}
919}; 919};
920 920
921static __u8 ov7660_60HZ[][4] = { 921static const __u8 ov7660_60HZ[][4] = {
922 {0x00, 0x3b, 0x00, 0xaa}, 922 {0x00, 0x3b, 0x00, 0xaa},
923 {0x00, 0x9e, 0x40, 0xaa}, 923 {0x00, 0x9e, 0x40, 0xaa},
924 {0x00, 0x13, 0xa7, 0xaa}, 924 {0x00, 0x13, 0xa7, 0xaa},
925 {} 925 {}
926}; 926};
927 927
928static __u8 ov7660_NoFliker[][4] = { 928static const __u8 ov7660_NoFliker[][4] = {
929 {0x00, 0x13, 0x87, 0xaa}, 929 {0x00, 0x13, 0x87, 0xaa},
930 {} 930 {}
931}; 931};
932 932
933static __u8 ov7670_initVGA_JPG[][4] = { 933static const __u8 ov7670_initVGA_JPG[][4] = {
934 {0xb3, 0x01, 0x05, 0xcc}, 934 {0xb3, 0x01, 0x05, 0xcc},
935 {0x00, 0x00, 0x30, 0xdd}, {0xb0, 0x03, 0x19, 0xcc}, 935 {0x00, 0x00, 0x30, 0xdd}, {0xb0, 0x03, 0x19, 0xcc},
936 {0x00, 0x00, 0x10, 0xdd}, 936 {0x00, 0x00, 0x10, 0xdd},
@@ -1058,7 +1058,7 @@ static __u8 ov7670_initVGA_JPG[][4] = {
1058 {}, 1058 {},
1059}; 1059};
1060 1060
1061static __u8 ov7670_initQVGA_JPG[][4] = { 1061static const __u8 ov7670_initQVGA_JPG[][4] = {
1062 {0xb3, 0x01, 0x05, 0xcc}, {0x00, 0x00, 0x30, 0xdd}, 1062 {0xb3, 0x01, 0x05, 0xcc}, {0x00, 0x00, 0x30, 0xdd},
1063 {0xb0, 0x03, 0x19, 0xcc}, {0x00, 0x00, 0x10, 0xdd}, 1063 {0xb0, 0x03, 0x19, 0xcc}, {0x00, 0x00, 0x10, 0xdd},
1064 {0xb0, 0x04, 0x02, 0xcc}, {0x00, 0x00, 0x10, 0xdd}, 1064 {0xb0, 0x04, 0x02, 0xcc}, {0x00, 0x00, 0x10, 0xdd},
@@ -1200,7 +1200,7 @@ struct sensor_info {
1200 __u8 op; 1200 __u8 op;
1201 }; 1201 };
1202 1202
1203static struct sensor_info sensor_info_data[] = { 1203static const struct sensor_info sensor_info_data[] = {
1204/* sensorId, I2cAdd, IdAdd, VpId, m1, m2, op */ 1204/* sensorId, I2cAdd, IdAdd, VpId, m1, m2, op */
1205 {SENSOR_HV7131R, 0x80 | 0x11, 0x00, 0x0209, 0x24, 0x25, 0x01}, 1205 {SENSOR_HV7131R, 0x80 | 0x11, 0x00, 0x0209, 0x24, 0x25, 0x01},
1206 {SENSOR_OV7660, 0x80 | 0x21, 0x0a, 0x7660, 0x26, 0x26, 0x05}, 1206 {SENSOR_OV7660, 0x80 | 0x21, 0x0a, 0x7660, 0x26, 0x26, 0x05},
@@ -1282,7 +1282,7 @@ static int vc032x_probe_sensor(struct gspca_dev *gspca_dev)
1282 int i; 1282 int i;
1283 __u8 data; 1283 __u8 data;
1284 __u16 value; 1284 __u16 value;
1285 struct sensor_info *ptsensor_info; 1285 const struct sensor_info *ptsensor_info;
1286 1286
1287 reg_r(dev, 0xa1, 0xbfcf, &data, 1); 1287 reg_r(dev, 0xa1, 0xbfcf, &data, 1);
1288 PDEBUG(D_PROBE, "check sensor header %d", data); 1288 PDEBUG(D_PROBE, "check sensor header %d", data);
@@ -1309,7 +1309,7 @@ static int vc032x_probe_sensor(struct gspca_dev *gspca_dev)
1309} 1309}
1310 1310
1311static __u8 i2c_write(struct usb_device *dev, 1311static __u8 i2c_write(struct usb_device *dev,
1312 __u8 reg, __u8 *val, __u8 size) 1312 __u8 reg, const __u8 *val, __u8 size)
1313{ 1313{
1314 __u8 retbyte; 1314 __u8 retbyte;
1315 1315
@@ -1341,7 +1341,7 @@ static __u8 i2c_write(struct usb_device *dev,
1341} 1341}
1342 1342
1343static void put_tab_to_reg(struct gspca_dev *gspca_dev, 1343static void put_tab_to_reg(struct gspca_dev *gspca_dev,
1344 __u8 *tab, __u8 tabsize, __u16 addr) 1344 const __u8 *tab, __u8 tabsize, __u16 addr)
1345{ 1345{
1346 int j; 1346 int j;
1347 __u16 ad = addr; 1347 __u16 ad = addr;
@@ -1351,7 +1351,7 @@ static void put_tab_to_reg(struct gspca_dev *gspca_dev,
1351} 1351}
1352 1352
1353static void usb_exchange(struct gspca_dev *gspca_dev, 1353static void usb_exchange(struct gspca_dev *gspca_dev,
1354 __u8 data[][4]) 1354 const __u8 data[][4])
1355{ 1355{
1356 struct usb_device *dev = gspca_dev->dev; 1356 struct usb_device *dev = gspca_dev->dev;
1357 int i = 0; 1357 int i = 0;
@@ -1511,7 +1511,7 @@ static void setautogain(struct gspca_dev *gspca_dev)
1511static void setlightfreq(struct gspca_dev *gspca_dev) 1511static void setlightfreq(struct gspca_dev *gspca_dev)
1512{ 1512{
1513 struct sd *sd = (struct sd *) gspca_dev; 1513 struct sd *sd = (struct sd *) gspca_dev;
1514 static __u8 (*ov7660_freq_tb[3])[4] = 1514 static const __u8 (*ov7660_freq_tb[3])[4] =
1515 {ov7660_NoFliker, ov7660_50HZ, ov7660_60HZ}; 1515 {ov7660_NoFliker, ov7660_50HZ, ov7660_60HZ};
1516 1516
1517 if (sd->sensor != SENSOR_OV7660) 1517 if (sd->sensor != SENSOR_OV7660)
@@ -1523,8 +1523,8 @@ static void sd_start(struct gspca_dev *gspca_dev)
1523{ 1523{
1524 struct sd *sd = (struct sd *) gspca_dev; 1524 struct sd *sd = (struct sd *) gspca_dev;
1525/* __u8 tmp2; */ 1525/* __u8 tmp2; */
1526 __u8 *GammaT = NULL; 1526 const __u8 *GammaT = NULL;
1527 __u8 *MatrixT = NULL; 1527 const __u8 *MatrixT = NULL;
1528 int mode; 1528 int mode;
1529 1529
1530 /* Assume start use the good resolution from gspca_dev->mode */ 1530 /* Assume start use the good resolution from gspca_dev->mode */
@@ -1673,7 +1673,7 @@ static void sd_close(struct gspca_dev *gspca_dev)
1673 1673
1674static void sd_pkt_scan(struct gspca_dev *gspca_dev, 1674static void sd_pkt_scan(struct gspca_dev *gspca_dev,
1675 struct gspca_frame *frame, /* target */ 1675 struct gspca_frame *frame, /* target */
1676 unsigned char *data, /* isoc packet */ 1676 __u8 *data, /* isoc packet */
1677 int len) /* iso pkt length */ 1677 int len) /* iso pkt length */
1678{ 1678{
1679 struct sd *sd = (struct sd *) gspca_dev; 1679 struct sd *sd = (struct sd *) gspca_dev;
@@ -1739,13 +1739,13 @@ static int sd_querymenu(struct gspca_dev *gspca_dev,
1739 case V4L2_CID_POWER_LINE_FREQUENCY: 1739 case V4L2_CID_POWER_LINE_FREQUENCY:
1740 switch (menu->index) { 1740 switch (menu->index) {
1741 case 0: /* V4L2_CID_POWER_LINE_FREQUENCY_DISABLED */ 1741 case 0: /* V4L2_CID_POWER_LINE_FREQUENCY_DISABLED */
1742 strcpy(menu->name, "NoFliker"); 1742 strcpy((char *) menu->name, "NoFliker");
1743 return 0; 1743 return 0;
1744 case 1: /* V4L2_CID_POWER_LINE_FREQUENCY_50HZ */ 1744 case 1: /* V4L2_CID_POWER_LINE_FREQUENCY_50HZ */
1745 strcpy(menu->name, "50 Hz"); 1745 strcpy((char *) menu->name, "50 Hz");
1746 return 0; 1746 return 0;
1747 case 2: /* V4L2_CID_POWER_LINE_FREQUENCY_60HZ */ 1747 case 2: /* V4L2_CID_POWER_LINE_FREQUENCY_60HZ */
1748 strcpy(menu->name, "60 Hz"); 1748 strcpy((char *) menu->name, "60 Hz");
1749 return 0; 1749 return 0;
1750 } 1750 }
1751 break; 1751 break;
@@ -1754,7 +1754,7 @@ static int sd_querymenu(struct gspca_dev *gspca_dev,
1754} 1754}
1755 1755
1756/* sub-driver description */ 1756/* sub-driver description */
1757static struct sd_desc sd_desc = { 1757static const struct sd_desc sd_desc = {
1758 .name = MODULE_NAME, 1758 .name = MODULE_NAME,
1759 .ctrls = sd_ctrls, 1759 .ctrls = sd_ctrls,
1760 .nctrls = ARRAY_SIZE(sd_ctrls), 1760 .nctrls = ARRAY_SIZE(sd_ctrls),
@@ -1770,7 +1770,7 @@ static struct sd_desc sd_desc = {
1770 1770
1771/* -- module initialisation -- */ 1771/* -- module initialisation -- */
1772#define DVNM(name) .driver_info = (kernel_ulong_t) name 1772#define DVNM(name) .driver_info = (kernel_ulong_t) name
1773static __devinitdata struct usb_device_id device_table[] = { 1773static const __devinitdata struct usb_device_id device_table[] = {
1774 {USB_DEVICE(0x046d, 0x0892), DVNM("Logitech Orbicam")}, 1774 {USB_DEVICE(0x046d, 0x0892), DVNM("Logitech Orbicam")},
1775 {USB_DEVICE(0x046d, 0x0896), DVNM("Logitech Orbicam")}, 1775 {USB_DEVICE(0x046d, 0x0896), DVNM("Logitech Orbicam")},
1776 {USB_DEVICE(0x0ac8, 0x0321), DVNM("Vimicro generic vc0321")}, 1776 {USB_DEVICE(0x0ac8, 0x0321), DVNM("Vimicro generic vc0321")},