Commit 34662342 authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

V4L/DVB (8667): gspca: Bad probe of Z-Star/Vimicro webcams with pas106 sensor.

This patch moves the detection of the 2wr SIF pas106b sensor to before
detecting other sensors.
Patch change by jfm: Check SIF for identified webcams only.
Signed-off-by: default avatarHans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 8559e8da
...@@ -6964,8 +6964,13 @@ static int zcxx_probeSensor(struct gspca_dev *gspca_dev) ...@@ -6964,8 +6964,13 @@ static int zcxx_probeSensor(struct gspca_dev *gspca_dev)
case SENSOR_MC501CB: case SENSOR_MC501CB:
return -1; /* don't probe */ return -1; /* don't probe */
case SENSOR_TAS5130C_VF0250: case SENSOR_TAS5130C_VF0250:
/* may probe but with write in reg 0x0010 */ /* may probe but with no write in reg 0x0010 */
return -1; /* don't probe */ return -1; /* don't probe */
case SENSOR_PAS106:
sensor = sif_probe(gspca_dev);
if (sensor >= 0)
return sensor;
break;
} }
sensor = vga_2wr_probe(gspca_dev); sensor = vga_2wr_probe(gspca_dev);
if (sensor >= 0) { if (sensor >= 0) {
...@@ -6974,12 +6979,10 @@ static int zcxx_probeSensor(struct gspca_dev *gspca_dev) ...@@ -6974,12 +6979,10 @@ static int zcxx_probeSensor(struct gspca_dev *gspca_dev)
/* next probe is needed for OmniVision ? */ /* next probe is needed for OmniVision ? */
} }
sensor2 = vga_3wr_probe(gspca_dev); sensor2 = vga_3wr_probe(gspca_dev);
if (sensor2 >= 0) { if (sensor2 >= 0
if (sensor >= 0) && sensor >= 0)
return sensor; return sensor;
return sensor2; return sensor2;
}
return sif_probe(gspca_dev);
} }
/* this function is called at probe time */ /* this function is called at probe time */
...@@ -7502,14 +7505,14 @@ static const __devinitdata struct usb_device_id device_table[] = { ...@@ -7502,14 +7505,14 @@ static const __devinitdata struct usb_device_id device_table[] = {
{USB_DEVICE(0x041e, 0x041e)}, {USB_DEVICE(0x041e, 0x041e)},
#ifndef CONFIG_USB_ZC0301 #ifndef CONFIG_USB_ZC0301
{USB_DEVICE(0x041e, 0x4017)}, {USB_DEVICE(0x041e, 0x4017)},
{USB_DEVICE(0x041e, 0x401c)}, {USB_DEVICE(0x041e, 0x401c), .driver_info = SENSOR_PAS106},
{USB_DEVICE(0x041e, 0x401e)}, {USB_DEVICE(0x041e, 0x401e)},
{USB_DEVICE(0x041e, 0x401f)}, {USB_DEVICE(0x041e, 0x401f)},
#endif #endif
{USB_DEVICE(0x041e, 0x4029)}, {USB_DEVICE(0x041e, 0x4029)},
#ifndef CONFIG_USB_ZC0301 #ifndef CONFIG_USB_ZC0301
{USB_DEVICE(0x041e, 0x4034)}, {USB_DEVICE(0x041e, 0x4034), .driver_info = SENSOR_PAS106},
{USB_DEVICE(0x041e, 0x4035)}, {USB_DEVICE(0x041e, 0x4035), .driver_info = SENSOR_PAS106},
{USB_DEVICE(0x041e, 0x4036)}, {USB_DEVICE(0x041e, 0x4036)},
{USB_DEVICE(0x041e, 0x403a)}, {USB_DEVICE(0x041e, 0x403a)},
#endif #endif
...@@ -7541,10 +7544,10 @@ static const __devinitdata struct usb_device_id device_table[] = { ...@@ -7541,10 +7544,10 @@ static const __devinitdata struct usb_device_id device_table[] = {
{USB_DEVICE(0x046d, 0x08d8)}, {USB_DEVICE(0x046d, 0x08d8)},
{USB_DEVICE(0x046d, 0x08da)}, {USB_DEVICE(0x046d, 0x08da)},
{USB_DEVICE(0x046d, 0x08dd), .driver_info = SENSOR_MC501CB}, {USB_DEVICE(0x046d, 0x08dd), .driver_info = SENSOR_MC501CB},
{USB_DEVICE(0x0471, 0x0325)}, {USB_DEVICE(0x0471, 0x0325), .driver_info = SENSOR_PAS106},
{USB_DEVICE(0x0471, 0x0326)}, {USB_DEVICE(0x0471, 0x0326), .driver_info = SENSOR_PAS106},
{USB_DEVICE(0x0471, 0x032d)}, {USB_DEVICE(0x0471, 0x032d), .driver_info = SENSOR_PAS106},
{USB_DEVICE(0x0471, 0x032e)}, {USB_DEVICE(0x0471, 0x032e), .driver_info = SENSOR_PAS106},
{USB_DEVICE(0x055f, 0xc005)}, {USB_DEVICE(0x055f, 0xc005)},
#ifndef CONFIG_USB_ZC0301 #ifndef CONFIG_USB_ZC0301
{USB_DEVICE(0x055f, 0xd003)}, {USB_DEVICE(0x055f, 0xd003)},
......
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