Commit 294d8b4a authored by Jean-François Moine's avatar Jean-François Moine Committed by Mauro Carvalho Chehab

V4L/DVB: gspca - mr97310a: Declare static the constant tables

Signed-off-by: default avatarJean-François Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 2856643e
...@@ -673,7 +673,7 @@ static int start_cif_cam(struct gspca_dev *gspca_dev) ...@@ -673,7 +673,7 @@ static int start_cif_cam(struct gspca_dev *gspca_dev)
struct sd *sd = (struct sd *) gspca_dev; struct sd *sd = (struct sd *) gspca_dev;
__u8 *data = gspca_dev->usb_buf; __u8 *data = gspca_dev->usb_buf;
int err_code; int err_code;
const __u8 startup_string[] = { static const __u8 startup_string[] = {
0x00, 0x00,
0x0d, 0x0d,
0x01, 0x01,
...@@ -719,7 +719,7 @@ static int start_cif_cam(struct gspca_dev *gspca_dev) ...@@ -719,7 +719,7 @@ static int start_cif_cam(struct gspca_dev *gspca_dev)
return err_code; return err_code;
if (!sd->sensor_type) { if (!sd->sensor_type) {
const struct sensor_w_data cif_sensor0_init_data[] = { static const struct sensor_w_data cif_sensor0_init_data[] = {
{0x02, 0x00, {0x03, 0x5a, 0xb5, 0x01, {0x02, 0x00, {0x03, 0x5a, 0xb5, 0x01,
0x0f, 0x14, 0x0f, 0x10}, 8}, 0x0f, 0x14, 0x0f, 0x10}, 8},
{0x0c, 0x00, {0x04, 0x01, 0x01, 0x00, 0x1f}, 5}, {0x0c, 0x00, {0x04, 0x01, 0x01, 0x00, 0x1f}, 5},
...@@ -740,7 +740,7 @@ static int start_cif_cam(struct gspca_dev *gspca_dev) ...@@ -740,7 +740,7 @@ static int start_cif_cam(struct gspca_dev *gspca_dev)
err_code = sensor_write_regs(gspca_dev, cif_sensor0_init_data, err_code = sensor_write_regs(gspca_dev, cif_sensor0_init_data,
ARRAY_SIZE(cif_sensor0_init_data)); ARRAY_SIZE(cif_sensor0_init_data));
} else { /* sd->sensor_type = 1 */ } else { /* sd->sensor_type = 1 */
const struct sensor_w_data cif_sensor1_init_data[] = { static const struct sensor_w_data cif_sensor1_init_data[] = {
/* Reg 3,4, 7,8 get set by the controls */ /* Reg 3,4, 7,8 get set by the controls */
{0x02, 0x00, {0x10}, 1}, {0x02, 0x00, {0x10}, 1},
{0x05, 0x01, {0x22}, 1}, /* 5/6 also seen as 65h/32h */ {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,8 +775,9 @@ static int start_vga_cam(struct gspca_dev *gspca_dev)
struct sd *sd = (struct sd *) gspca_dev; struct sd *sd = (struct sd *) gspca_dev;
__u8 *data = gspca_dev->usb_buf; __u8 *data = gspca_dev->usb_buf;
int err_code; int err_code;
const __u8 startup_string[] = {0x00, 0x0d, 0x01, 0x00, 0x00, 0x2b, static const __u8 startup_string[] =
0x00, 0x00, 0x00, 0x50, 0xc0}; {0x00, 0x0d, 0x01, 0x00, 0x00, 0x2b, 0x00, 0x00,
0x00, 0x50, 0xc0};
/* What some of these mean is explained in start_cif_cam(), above */ /* What some of these mean is explained in start_cif_cam(), above */
memcpy(data, startup_string, 11); memcpy(data, startup_string, 11);
...@@ -828,7 +829,7 @@ static int start_vga_cam(struct gspca_dev *gspca_dev) ...@@ -828,7 +829,7 @@ static int start_vga_cam(struct gspca_dev *gspca_dev)
return err_code; return err_code;
if (!sd->sensor_type) { if (!sd->sensor_type) {
const struct sensor_w_data vga_sensor0_init_data[] = { static const struct sensor_w_data vga_sensor0_init_data[] = {
{0x01, 0x00, {0x0c, 0x00, 0x04}, 3}, {0x01, 0x00, {0x0c, 0x00, 0x04}, 3},
{0x14, 0x00, {0x01, 0xe4, 0x02, 0x84}, 4}, {0x14, 0x00, {0x01, 0xe4, 0x02, 0x84}, 4},
{0x20, 0x00, {0x00, 0x80, 0x00, 0x08}, 4}, {0x20, 0x00, {0x00, 0x80, 0x00, 0x08}, 4},
...@@ -839,20 +840,20 @@ static int start_vga_cam(struct gspca_dev *gspca_dev) ...@@ -839,20 +840,20 @@ static int start_vga_cam(struct gspca_dev *gspca_dev)
err_code = sensor_write_regs(gspca_dev, vga_sensor0_init_data, err_code = sensor_write_regs(gspca_dev, vga_sensor0_init_data,
ARRAY_SIZE(vga_sensor0_init_data)); ARRAY_SIZE(vga_sensor0_init_data));
} else if (sd->sensor_type == 1) { } else if (sd->sensor_type == 1) {
const struct sensor_w_data color_adj[] = { static const struct sensor_w_data color_adj[] = {
{0x02, 0x00, {0x06, 0x59, 0x0c, 0x16, 0x00, {0x02, 0x00, {0x06, 0x59, 0x0c, 0x16, 0x00,
/* adjusted blue, green, red gain correct /* adjusted blue, green, red gain correct
too much blue from the Sakar Digital */ too much blue from the Sakar Digital */
0x05, 0x01, 0x04}, 8} 0x05, 0x01, 0x04}, 8}
}; };
const struct sensor_w_data color_no_adj[] = { static const struct sensor_w_data color_no_adj[] = {
{0x02, 0x00, {0x06, 0x59, 0x0c, 0x16, 0x00, {0x02, 0x00, {0x06, 0x59, 0x0c, 0x16, 0x00,
/* default blue, green, red gain settings */ /* default blue, green, red gain settings */
0x07, 0x00, 0x01}, 8} 0x07, 0x00, 0x01}, 8}
}; };
const struct sensor_w_data vga_sensor1_init_data[] = { static const struct sensor_w_data vga_sensor1_init_data[] = {
{0x11, 0x04, {0x01}, 1}, {0x11, 0x04, {0x01}, 1},
{0x0a, 0x00, {0x00, 0x01, 0x00, 0x00, 0x01, {0x0a, 0x00, {0x00, 0x01, 0x00, 0x00, 0x01,
/* These settings may be better for some cameras */ /* These settings may be better for some cameras */
...@@ -877,7 +878,7 @@ static int start_vga_cam(struct gspca_dev *gspca_dev) ...@@ -877,7 +878,7 @@ static int start_vga_cam(struct gspca_dev *gspca_dev)
err_code = sensor_write_regs(gspca_dev, vga_sensor1_init_data, err_code = sensor_write_regs(gspca_dev, vga_sensor1_init_data,
ARRAY_SIZE(vga_sensor1_init_data)); ARRAY_SIZE(vga_sensor1_init_data));
} else { /* sensor type == 2 */ } else { /* sensor type == 2 */
const struct sensor_w_data vga_sensor2_init_data[] = { static const struct sensor_w_data vga_sensor2_init_data[] = {
{0x01, 0x00, {0x48}, 1}, {0x01, 0x00, {0x48}, 1},
{0x02, 0x00, {0x22}, 1}, {0x02, 0x00, {0x22}, 1},
...@@ -974,7 +975,7 @@ static void setbrightness(struct gspca_dev *gspca_dev) ...@@ -974,7 +975,7 @@ static void setbrightness(struct gspca_dev *gspca_dev)
u8 val; u8 val;
u8 sign_reg = 7; /* This reg and the next one used on CIF cams. */ u8 sign_reg = 7; /* This reg and the next one used on CIF cams. */
u8 value_reg = 8; /* VGA cams seem to use regs 0x0b and 0x0c */ u8 value_reg = 8; /* VGA cams seem to use regs 0x0b and 0x0c */
const u8 quick_clix_table[] = static const u8 quick_clix_table[] =
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 */
{ 0, 4, 8, 12, 1, 2, 3, 5, 6, 9, 7, 10, 13, 11, 14, 15}; { 0, 4, 8, 12, 1, 2, 3, 5, 6, 9, 7, 10, 13, 11, 14, 15};
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment