Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226326
b: refs/heads/master
c: 3ebd179
h: refs/heads/master
v: v3
  • Loading branch information
Jean-François Moine authored and Mauro Carvalho Chehab committed Dec 29, 2010
1 parent c744541 commit f7182e0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 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: 634b4770539de63581ccdb554426547ced6ded01
refs/heads/master: 3ebd17946448df50b9082412d09955c87a112721
19 changes: 12 additions & 7 deletions trunk/drivers/media/video/gspca/sq930x.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,10 +687,12 @@ static void cmos_probe(struct gspca_dev *gspca_dev)
if (gspca_dev->usb_buf[0] != 0)
break;
}
if (i >= ARRAY_SIZE(probe_order))
if (i >= ARRAY_SIZE(probe_order)) {
err("Unknown sensor");
else
sd->sensor = probe_order[i];
gspca_dev->usb_err = -EINVAL;
return;
}
sd->sensor = probe_order[i];
}

static void mt9v111_init(struct gspca_dev *gspca_dev)
Expand Down Expand Up @@ -867,6 +869,9 @@ static int sd_init(struct gspca_dev *gspca_dev)
*/

reg_r(gspca_dev, SQ930_CTRL_GET_DEV_INFO, 8);
if (gspca_dev->usb_err < 0)
return gspca_dev->usb_err;

/* it returns:
* 03 00 12 93 0b f6 c9 00 live! ultra
* 03 00 07 93 0b f6 ca 00 live! ultra for notebook
Expand Down Expand Up @@ -905,10 +910,10 @@ static int sd_init(struct gspca_dev *gspca_dev)
else
cmos_probe(gspca_dev);
}

PDEBUG(D_PROBE, "Sensor %s", sensor_tb[sd->sensor].name);

global_init(sd, 1);
if (gspca_dev->usb_err >= 0) {
PDEBUG(D_PROBE, "Sensor %s", sensor_tb[sd->sensor].name);
global_init(sd, 1);
}
return gspca_dev->usb_err;
}

Expand Down

0 comments on commit f7182e0

Please sign in to comment.