Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208173
b: refs/heads/master
c: c39da6a
h: refs/heads/master
i:
  208171: 4233514
v: v3
  • Loading branch information
Jean-François Moine authored and Mauro Carvalho Chehab committed Aug 9, 2010
1 parent 3b6321a commit 41c5ad5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 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: 6d31450544c75d99e1f4dbb21d5db6b2ca6ada4d
refs/heads/master: c39da6a37566733d703bbd9a489fe39e95ea4df1
34 changes: 19 additions & 15 deletions trunk/drivers/media/video/gspca/zc3xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -6570,6 +6570,24 @@ static int zcxx_probeSensor(struct gspca_dev *gspca_dev)
/* this function is called at probe time */
static int sd_config(struct gspca_dev *gspca_dev,
const struct usb_device_id *id)
{
struct sd *sd = (struct sd *) gspca_dev;

/* define some sensors from the vendor/product */
sd->sensor = id->driver_info;

sd->sharpness = SHARPNESS_DEF;
sd->brightness = BRIGHTNESS_DEF;
sd->contrast = CONTRAST_DEF;
sd->autogain = AUTOGAIN_DEF;
sd->lightfreq = FREQ_DEF;
sd->quality = QUALITY_DEF;

return 0;
}

/* this function is called at probe and resume time */
static int sd_init(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
struct cam *cam;
Expand Down Expand Up @@ -6617,9 +6635,6 @@ static int sd_config(struct gspca_dev *gspca_dev,
[SENSOR_TAS5130C_VF0250] = 1,
};

/* define some sensors from the vendor/product */
sd->sharpness = SHARPNESS_DEF;
sd->sensor = id->driver_info;
sensor = zcxx_probeSensor(gspca_dev);
if (sensor >= 0)
PDEBUG(D_PROBE, "probe sensor -> %04x", sensor);
Expand Down Expand Up @@ -6775,12 +6790,7 @@ static int sd_config(struct gspca_dev *gspca_dev,
cam->nmodes = ARRAY_SIZE(broken_vga_mode);
break;
}
sd->brightness = BRIGHTNESS_DEF;
sd->contrast = CONTRAST_DEF;
sd->gamma = gamma[sd->sensor];
sd->autogain = AUTOGAIN_DEF;
sd->lightfreq = FREQ_DEF;
sd->quality = QUALITY_DEF;

switch (sd->sensor) {
case SENSOR_HV7131B:
Expand All @@ -6790,15 +6800,9 @@ static int sd_config(struct gspca_dev *gspca_dev,
break;
}

return gspca_dev->usb_err;
}

/* this function is called at probe and resume time */
static int sd_init(struct gspca_dev *gspca_dev)
{
/* switch off the led */
reg_w(gspca_dev, 0x01, 0x0000);
return 0;
return gspca_dev->usb_err;
}

static int sd_start(struct gspca_dev *gspca_dev)
Expand Down

0 comments on commit 41c5ad5

Please sign in to comment.