提交 603538a0 编写于 作者: J Jean-Francois Moine 提交者: Mauro Carvalho Chehab

V4L/DVB (10680): gspca - zc3xx: Bad probe of the ov7xxx sensors.

This patch fixes one bug of the kernel bug report 12737.
Signed-off-by: NJean-Francois Moine <moinejf@free.fr>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 8d97770a
...@@ -6987,7 +6987,7 @@ static int vga_3wr_probe(struct gspca_dev *gspca_dev) ...@@ -6987,7 +6987,7 @@ static int vga_3wr_probe(struct gspca_dev *gspca_dev)
static int zcxx_probeSensor(struct gspca_dev *gspca_dev) static int zcxx_probeSensor(struct gspca_dev *gspca_dev)
{ {
struct sd *sd = (struct sd *) gspca_dev; struct sd *sd = (struct sd *) gspca_dev;
int sensor, sensor2; int sensor;
switch (sd->sensor) { switch (sd->sensor) {
case SENSOR_MC501CB: case SENSOR_MC501CB:
...@@ -7002,16 +7002,9 @@ static int zcxx_probeSensor(struct gspca_dev *gspca_dev) ...@@ -7002,16 +7002,9 @@ static int zcxx_probeSensor(struct gspca_dev *gspca_dev)
break; break;
} }
sensor = vga_2wr_probe(gspca_dev); sensor = vga_2wr_probe(gspca_dev);
if (sensor >= 0) { if (sensor >= 0)
if (sensor < 0x7600)
return sensor;
/* next probe is needed for OmniVision ? */
}
sensor2 = vga_3wr_probe(gspca_dev);
if (sensor2 >= 0
&& sensor >= 0)
return sensor; return sensor;
return sensor2; return vga_3wr_probe(gspca_dev);
} }
/* this function is called at probe time */ /* this function is called at probe time */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册