aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorJean-François Moine <moinejf@free.fr>2010-10-01 06:37:15 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:06:21 -0400
commit294d8b4a969b834f0d02c623eef050a0f3c1e209 (patch)
tree57cef96bcc1c115f32300ce06b09398795264da2 /drivers/media
parent2856643e2e18f306227ae1257b63fc713d426dc7 (diff)
V4L/DVB: gspca - mr97310a: Declare static the constant tables
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/gspca/mr97310a.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/media/video/gspca/mr97310a.c b/drivers/media/video/gspca/mr97310a.c
index c6e699b80f12..7607a288b51c 100644
--- a/drivers/media/video/gspca/mr97310a.c
+++ b/drivers/media/video/gspca/mr97310a.c
@@ -673,7 +673,7 @@ static int start_cif_cam(struct gspca_dev *gspca_dev)
673 struct sd *sd = (struct sd *) gspca_dev; 673 struct sd *sd = (struct sd *) gspca_dev;
674 __u8 *data = gspca_dev->usb_buf; 674 __u8 *data = gspca_dev->usb_buf;
675 int err_code; 675 int err_code;
676 const __u8 startup_string[] = { 676 static const __u8 startup_string[] = {
677 0x00, 677 0x00,
678 0x0d, 678 0x0d,
679 0x01, 679 0x01,
@@ -719,7 +719,7 @@ static int start_cif_cam(struct gspca_dev *gspca_dev)
719 return err_code; 719 return err_code;
720 720
721 if (!sd->sensor_type) { 721 if (!sd->sensor_type) {
722 const struct sensor_w_data cif_sensor0_init_data[] = { 722 static const struct sensor_w_data cif_sensor0_init_data[] = {
723 {0x02, 0x00, {0x03, 0x5a, 0xb5, 0x01, 723 {0x02, 0x00, {0x03, 0x5a, 0xb5, 0x01,
724 0x0f, 0x14, 0x0f, 0x10}, 8}, 724 0x0f, 0x14, 0x0f, 0x10}, 8},
725 {0x0c, 0x00, {0x04, 0x01, 0x01, 0x00, 0x1f}, 5}, 725 {0x0c, 0x00, {0x04, 0x01, 0x01, 0x00, 0x1f}, 5},
@@ -740,7 +740,7 @@ static int start_cif_cam(struct gspca_dev *gspca_dev)
740 err_code = sensor_write_regs(gspca_dev, cif_sensor0_init_data, 740 err_code = sensor_write_regs(gspca_dev, cif_sensor0_init_data,
741 ARRAY_SIZE(cif_sensor0_init_data)); 741 ARRAY_SIZE(cif_sensor0_init_data));
742 } else { /* sd->sensor_type = 1 */ 742 } else { /* sd->sensor_type = 1 */
743 const struct sensor_w_data cif_sensor1_init_data[] = { 743 static const struct sensor_w_data cif_sensor1_init_data[] = {
744 /* Reg 3,4, 7,8 get set by the controls */ 744 /* Reg 3,4, 7,8 get set by the controls */
745 {0x02, 0x00, {0x10}, 1}, 745 {0x02, 0x00, {0x10}, 1},
746 {0x05, 0x01, {0x22}, 1}, /* 5/6 also seen as 65h/32h */ 746 {0x05, 0x01, {0x22}, 1}, /* 5/6 also seen as 65h/32h */
@@ -775,8 +775,9 @@ static int start_vga_cam(struct gspca_dev *gspca_dev)
775 struct sd *sd = (struct sd *) gspca_dev; 775 struct sd *sd = (struct sd *) gspca_dev;
776 __u8 *data = gspca_dev->usb_buf; 776 __u8 *data = gspca_dev->usb_buf;
777 int err_code; 777 int err_code;
778 const __u8 startup_string[] = {0x00, 0x0d, 0x01, 0x00, 0x00, 0x2b, 778 static const __u8 startup_string[] =
779 0x00, 0x00, 0x00, 0x50, 0xc0}; 779 {0x00, 0x0d, 0x01, 0x00, 0x00, 0x2b, 0x00, 0x00,
780 0x00, 0x50, 0xc0};
780 /* What some of these mean is explained in start_cif_cam(), above */ 781 /* What some of these mean is explained in start_cif_cam(), above */
781 782
782 memcpy(data, startup_string, 11); 783 memcpy(data, startup_string, 11);
@@ -828,7 +829,7 @@ static int start_vga_cam(struct gspca_dev *gspca_dev)
828 return err_code; 829 return err_code;
829 830
830 if (!sd->sensor_type) { 831 if (!sd->sensor_type) {
831 const struct sensor_w_data vga_sensor0_init_data[] = { 832 static const struct sensor_w_data vga_sensor0_init_data[] = {
832 {0x01, 0x00, {0x0c, 0x00, 0x04}, 3}, 833 {0x01, 0x00, {0x0c, 0x00, 0x04}, 3},
833 {0x14, 0x00, {0x01, 0xe4, 0x02, 0x84}, 4}, 834 {0x14, 0x00, {0x01, 0xe4, 0x02, 0x84}, 4},
834 {0x20, 0x00, {0x00, 0x80, 0x00, 0x08}, 4}, 835 {0x20, 0x00, {0x00, 0x80, 0x00, 0x08}, 4},
@@ -839,20 +840,20 @@ static int start_vga_cam(struct gspca_dev *gspca_dev)
839 err_code = sensor_write_regs(gspca_dev, vga_sensor0_init_data, 840 err_code = sensor_write_regs(gspca_dev, vga_sensor0_init_data,
840 ARRAY_SIZE(vga_sensor0_init_data)); 841 ARRAY_SIZE(vga_sensor0_init_data));
841 } else if (sd->sensor_type == 1) { 842 } else if (sd->sensor_type == 1) {
842 const struct sensor_w_data color_adj[] = { 843 static const struct sensor_w_data color_adj[] = {
843 {0x02, 0x00, {0x06, 0x59, 0x0c, 0x16, 0x00, 844 {0x02, 0x00, {0x06, 0x59, 0x0c, 0x16, 0x00,
844 /* adjusted blue, green, red gain correct 845 /* adjusted blue, green, red gain correct
845 too much blue from the Sakar Digital */ 846 too much blue from the Sakar Digital */
846 0x05, 0x01, 0x04}, 8} 847 0x05, 0x01, 0x04}, 8}
847 }; 848 };
848 849
849 const struct sensor_w_data color_no_adj[] = { 850 static const struct sensor_w_data color_no_adj[] = {
850 {0x02, 0x00, {0x06, 0x59, 0x0c, 0x16, 0x00, 851 {0x02, 0x00, {0x06, 0x59, 0x0c, 0x16, 0x00,
851 /* default blue, green, red gain settings */ 852 /* default blue, green, red gain settings */
852 0x07, 0x00, 0x01}, 8} 853 0x07, 0x00, 0x01}, 8}
853 }; 854 };
854 855
855 const struct sensor_w_data vga_sensor1_init_data[] = { 856 static const struct sensor_w_data vga_sensor1_init_data[] = {
856 {0x11, 0x04, {0x01}, 1}, 857 {0x11, 0x04, {0x01}, 1},
857 {0x0a, 0x00, {0x00, 0x01, 0x00, 0x00, 0x01, 858 {0x0a, 0x00, {0x00, 0x01, 0x00, 0x00, 0x01,
858 /* These settings may be better for some cameras */ 859 /* These settings may be better for some cameras */
@@ -877,7 +878,7 @@ static int start_vga_cam(struct gspca_dev *gspca_dev)
877 err_code = sensor_write_regs(gspca_dev, vga_sensor1_init_data, 878 err_code = sensor_write_regs(gspca_dev, vga_sensor1_init_data,
878 ARRAY_SIZE(vga_sensor1_init_data)); 879 ARRAY_SIZE(vga_sensor1_init_data));
879 } else { /* sensor type == 2 */ 880 } else { /* sensor type == 2 */
880 const struct sensor_w_data vga_sensor2_init_data[] = { 881 static const struct sensor_w_data vga_sensor2_init_data[] = {
881 882
882 {0x01, 0x00, {0x48}, 1}, 883 {0x01, 0x00, {0x48}, 1},
883 {0x02, 0x00, {0x22}, 1}, 884 {0x02, 0x00, {0x22}, 1},
@@ -974,7 +975,7 @@ static void setbrightness(struct gspca_dev *gspca_dev)
974 u8 val; 975 u8 val;
975 u8 sign_reg = 7; /* This reg and the next one used on CIF cams. */ 976 u8 sign_reg = 7; /* This reg and the next one used on CIF cams. */
976 u8 value_reg = 8; /* VGA cams seem to use regs 0x0b and 0x0c */ 977 u8 value_reg = 8; /* VGA cams seem to use regs 0x0b and 0x0c */
977 const u8 quick_clix_table[] = 978 static const u8 quick_clix_table[] =
978 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */ 979 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
979 { 0, 4, 8, 12, 1, 2, 3, 5, 6, 9, 7, 10, 13, 11, 14, 15}; 980 { 0, 4, 8, 12, 1, 2, 3, 5, 6, 9, 7, 10, 13, 11, 14, 15};
980 /* 981 /*