Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161600
b: refs/heads/master
c: 7802870
h: refs/heads/master
v: v3
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Sep 12, 2009
1 parent eb00e63 commit 93e817b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1e3c1f7695a446742e24ea1f0c80715be98edbc4
refs/heads/master: 780287061b844aa44833b3e7d1a6b760e7aff2f6
17 changes: 17 additions & 0 deletions trunk/drivers/media/video/gspca/mr97310a.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ MODULE_AUTHOR("Kyle Guinn <elyk03@gmail.com>,"
MODULE_DESCRIPTION("GSPCA/Mars-Semi MR97310A USB Camera Driver");
MODULE_LICENSE("GPL");

/* global parameters */
int force_sensor_type = -1;
module_param(force_sensor_type, int, 0644);
MODULE_PARM_DESC(force_sensor_type, "Force sensor type (-1 (auto), 0 or 1)");

/* specific webcam descriptor */
struct sd {
struct gspca_dev gspca_dev; /* !! must be the first item */
Expand Down Expand Up @@ -401,6 +406,12 @@ static int sd_config(struct gspca_dev *gspca_dev,
PDEBUG(D_PROBE, "MR97310A CIF camera detected, sensor: %d",
sd->sensor_type);

if (force_sensor_type != -1) {
sd->sensor_type = !! force_sensor_type;
PDEBUG(D_PROBE, "Forcing sensor type to: %d",
sd->sensor_type);
}

if (sd->sensor_type == 0)
gspca_dev->ctrl_dis = (1 << BRIGHTNESS_IDX);
} else {
Expand Down Expand Up @@ -606,6 +617,12 @@ static int start_vga_cam(struct gspca_dev *gspca_dev)
msleep(200);
}

if (force_sensor_type != -1) {
sd->sensor_type = !! force_sensor_type;
PDEBUG(D_PROBE, "Forcing sensor type to: %d",
sd->sensor_type);
}

/*
* Known VGA cameras.
* This test is only run if the previous test returned 0x30, but
Expand Down

0 comments on commit 93e817b

Please sign in to comment.