Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285409
b: refs/heads/master
c: 630caa2
h: refs/heads/master
i:
  285407: df05f08
v: v3
  • Loading branch information
Sylwester Nawrocki authored and Mauro Carvalho Chehab committed Dec 30, 2011
1 parent a335988 commit 6386918
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 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: ce808a478ae5b79e52ea170b35c459829296330f
refs/heads/master: 630caa23b75ca5d399791fa5a4d8d5f4adf81489
2 changes: 0 additions & 2 deletions trunk/drivers/media/video/m5mols/m5mols.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ struct m5mols_version {
* @lock_awb: true means the Aut WhiteBalance is locked
* @resolution: register value for current resolution
* @mode: register value for current operation mode
* @mode_save: register value for current operation mode for saving
* @set_power: optional power callback to the board code
*/
struct m5mols_info {
Expand Down Expand Up @@ -211,7 +210,6 @@ struct m5mols_info {
bool lock_awb;
u8 resolution;
u8 mode;
u8 mode_save;
int (*set_power)(struct device *dev, int on);
};

Expand Down
13 changes: 6 additions & 7 deletions trunk/drivers/media/video/m5mols/m5mols_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,13 @@ int m5mols_mode(struct m5mols_info *info, u8 mode)
return ret;

ret = m5mols_read_u8(sd, SYSTEM_SYSMODE, &reg);
if ((!ret && reg == mode) || ret)
if (ret || reg == mode)
return ret;

switch (reg) {
case REG_PARAMETER:
ret = m5mols_reg_mode(sd, REG_MONITOR);
if (!ret && mode == REG_MONITOR)
if (mode == REG_MONITOR)
break;
if (!ret)
ret = m5mols_reg_mode(sd, REG_CAPTURE);
Expand All @@ -393,7 +393,7 @@ int m5mols_mode(struct m5mols_info *info, u8 mode)

case REG_CAPTURE:
ret = m5mols_reg_mode(sd, REG_MONITOR);
if (!ret && mode == REG_MONITOR)
if (mode == REG_MONITOR)
break;
if (!ret)
ret = m5mols_reg_mode(sd, REG_PARAMETER);
Expand Down Expand Up @@ -677,15 +677,14 @@ static int m5mols_s_ctrl(struct v4l2_ctrl *ctrl)
{
struct v4l2_subdev *sd = to_sd(ctrl);
struct m5mols_info *info = to_m5mols(sd);
int ret;

info->mode_save = info->mode;
int isp_state = info->mode;
int ret = 0;

ret = m5mols_mode(info, REG_PARAMETER);
if (!ret)
ret = m5mols_set_ctrl(ctrl);
if (!ret)
ret = m5mols_mode(info, info->mode_save);
ret = m5mols_mode(info, isp_state);

return ret;
}
Expand Down

0 comments on commit 6386918

Please sign in to comment.