From 294d8b4a969b834f0d02c623eef050a0f3c1e209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Moine?= Date: Fri, 1 Oct 2010 07:37:15 -0300 Subject: [PATCH] V4L/DVB: gspca - mr97310a: Declare static the constant tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jean-François Moine Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/gspca/mr97310a.c | 23 ++++++++++++----------- 1 file 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) struct sd *sd = (struct sd *) gspca_dev; __u8 *data = gspca_dev->usb_buf; int err_code; - const __u8 startup_string[] = { + static const __u8 startup_string[] = { 0x00, 0x0d, 0x01, @@ -719,7 +719,7 @@ static int start_cif_cam(struct gspca_dev *gspca_dev) return err_code; 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, 0x0f, 0x14, 0x0f, 0x10}, 8}, {0x0c, 0x00, {0x04, 0x01, 0x01, 0x00, 0x1f}, 5}, @@ -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, ARRAY_SIZE(cif_sensor0_init_data)); } 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 */ {0x02, 0x00, {0x10}, 1}, {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) struct sd *sd = (struct sd *) gspca_dev; __u8 *data = gspca_dev->usb_buf; int err_code; - const __u8 startup_string[] = {0x00, 0x0d, 0x01, 0x00, 0x00, 0x2b, - 0x00, 0x00, 0x00, 0x50, 0xc0}; + static const __u8 startup_string[] = + {0x00, 0x0d, 0x01, 0x00, 0x00, 0x2b, 0x00, 0x00, + 0x00, 0x50, 0xc0}; /* What some of these mean is explained in start_cif_cam(), above */ memcpy(data, startup_string, 11); @@ -828,7 +829,7 @@ static int start_vga_cam(struct gspca_dev *gspca_dev) return err_code; 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}, {0x14, 0x00, {0x01, 0xe4, 0x02, 0x84}, 4}, {0x20, 0x00, {0x00, 0x80, 0x00, 0x08}, 4}, @@ -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, ARRAY_SIZE(vga_sensor0_init_data)); } 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, /* adjusted blue, green, red gain correct too much blue from the Sakar Digital */ 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, /* default blue, green, red gain settings */ 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}, {0x0a, 0x00, {0x00, 0x01, 0x00, 0x00, 0x01, /* These settings may be better for some cameras */ @@ -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, ARRAY_SIZE(vga_sensor1_init_data)); } 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}, {0x02, 0x00, {0x22}, 1}, @@ -974,7 +975,7 @@ static void setbrightness(struct gspca_dev *gspca_dev) u8 val; 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 */ - 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, 4, 8, 12, 1, 2, 3, 5, 6, 9, 7, 10, 13, 11, 14, 15}; /*