Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219223
b: refs/heads/master
c: 294d8b4
h: refs/heads/master
i:
  219221: b89f3ac
  219219: 8583069
  219215: 9d2eca7
v: v3
  • Loading branch information
Jean-François Moine authored and Mauro Carvalho Chehab committed Oct 21, 2010
1 parent 1b68600 commit 30f9a9d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2856643e2e18f306227ae1257b63fc713d426dc7
refs/heads/master: 294d8b4a969b834f0d02c623eef050a0f3c1e209
23 changes: 12 additions & 11 deletions trunk/drivers/media/video/gspca/mr97310a.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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},
Expand All @@ -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 */
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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},
Expand All @@ -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 */
Expand All @@ -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},
Expand Down Expand Up @@ -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};
/*
Expand Down

0 comments on commit 30f9a9d

Please sign in to comment.