Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273714
b: refs/heads/master
c: 2e56d93
h: refs/heads/master
v: v3
  • Loading branch information
Janusz Krzysztofik authored and Mauro Carvalho Chehab committed Nov 3, 2011
1 parent 7ba2049 commit ad3640b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 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: 171f1a48bb3f95e3ecb37ecd6e8577118d601460
refs/heads/master: 2e56d933fd967a72d5ee4250e1cb6f9de29d936f
14 changes: 6 additions & 8 deletions trunk/drivers/media/video/ov6650.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ static int ov6550_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
struct v4l2_subdev *sd = &priv->subdev;
struct i2c_client *client = v4l2_get_subdevdata(sd);
uint8_t reg, reg2;
int ret = 0;
int ret;

switch (ctrl->id) {
case V4L2_CID_AUTOGAIN:
Expand Down Expand Up @@ -342,7 +342,7 @@ static int ov6550_s_ctrl(struct v4l2_ctrl *ctrl)
struct ov6650 *priv = container_of(ctrl->handler, struct ov6650, hdl);
struct v4l2_subdev *sd = &priv->subdev;
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret = 0;
int ret;

switch (ctrl->id) {
case V4L2_CID_AUTOGAIN:
Expand Down Expand Up @@ -370,10 +370,8 @@ static int ov6550_s_ctrl(struct v4l2_ctrl *ctrl)
case V4L2_CID_BRIGHTNESS:
return ov6650_reg_write(client, REG_BRT, ctrl->val);
case V4L2_CID_EXPOSURE_AUTO:
if (ctrl->val == V4L2_EXPOSURE_AUTO)
ret = ov6650_reg_rmw(client, REG_COMB, COMB_AEC, 0);
else
ret = ov6650_reg_rmw(client, REG_COMB, 0, COMB_AEC);
ret = ov6650_reg_rmw(client, REG_COMB, ctrl->val ==
V4L2_EXPOSURE_AUTO ? COMB_AEC : 0, COMB_AEC);
if (!ret && ctrl->val == V4L2_EXPOSURE_MANUAL)
ret = ov6650_reg_write(client, REG_AECH,
priv->exposure->val);
Expand Down Expand Up @@ -983,8 +981,8 @@ static int ov6650_probe(struct i2c_client *client,
v4l2_ctrl_new_std(&priv->hdl, &ov6550_ctrl_ops,
V4L2_CID_BRIGHTNESS, 0, 0xff, 1, 0x80);
priv->autoexposure = v4l2_ctrl_new_std_menu(&priv->hdl,
&ov6550_ctrl_ops, V4L2_CID_EXPOSURE_AUTO, 1, 0,
V4L2_EXPOSURE_AUTO);
&ov6550_ctrl_ops, V4L2_CID_EXPOSURE_AUTO,
V4L2_EXPOSURE_MANUAL, 0, V4L2_EXPOSURE_AUTO);
priv->exposure = v4l2_ctrl_new_std(&priv->hdl, &ov6550_ctrl_ops,
V4L2_CID_EXPOSURE, 0, 0xff, 1, DEF_AECH);
v4l2_ctrl_new_std(&priv->hdl, &ov6550_ctrl_ops,
Expand Down

0 comments on commit ad3640b

Please sign in to comment.