Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 311750
b: refs/heads/master
c: 6c6ee53
h: refs/heads/master
v: v3
  • Loading branch information
Hans de Goede authored and Linus Torvalds committed Jul 9, 2012
1 parent 1602f4d commit b5ea1ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 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: c5e43b83b0e2a5a24f7a2f1417e08db063b034f7
refs/heads/master: 6c6ee53c55dd0d3d9c3b42d4770bb82842d99727
13 changes: 8 additions & 5 deletions trunk/drivers/media/video/gspca/sn9c20x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2070,10 +2070,13 @@ static int sd_start(struct gspca_dev *gspca_dev)
set_gamma(gspca_dev, v4l2_ctrl_g_ctrl(sd->gamma));
set_redblue(gspca_dev, v4l2_ctrl_g_ctrl(sd->blue),
v4l2_ctrl_g_ctrl(sd->red));
set_gain(gspca_dev, v4l2_ctrl_g_ctrl(sd->gain));
set_exposure(gspca_dev, v4l2_ctrl_g_ctrl(sd->exposure));
set_hvflip(gspca_dev, v4l2_ctrl_g_ctrl(sd->hflip),
v4l2_ctrl_g_ctrl(sd->vflip));
if (sd->gain)
set_gain(gspca_dev, v4l2_ctrl_g_ctrl(sd->gain));
if (sd->exposure)
set_exposure(gspca_dev, v4l2_ctrl_g_ctrl(sd->exposure));
if (sd->hflip)
set_hvflip(gspca_dev, v4l2_ctrl_g_ctrl(sd->hflip),
v4l2_ctrl_g_ctrl(sd->vflip));

reg_w1(gspca_dev, 0x1007, 0x20);
reg_w1(gspca_dev, 0x1061, 0x03);
Expand Down Expand Up @@ -2176,7 +2179,7 @@ static void sd_dqcallback(struct gspca_dev *gspca_dev)
struct sd *sd = (struct sd *) gspca_dev;
int avg_lum;

if (!v4l2_ctrl_g_ctrl(sd->autogain))
if (sd->autogain == NULL || !v4l2_ctrl_g_ctrl(sd->autogain))
return;

avg_lum = atomic_read(&sd->avg_lum);
Expand Down

0 comments on commit b5ea1ba

Please sign in to comment.