Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164219
b: refs/heads/master
c: bf62e1d
h: refs/heads/master
i:
  164217: 1b2972b
  164215: 6178aa9
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Mauro Carvalho Chehab committed Sep 19, 2009
1 parent 3499568 commit 9949812
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: a0705b07f1816ae2b85388fcda71de69c221b4b8
refs/heads/master: bf62e1da6ac848b0c3f72665d05939263e9f4128
11 changes: 7 additions & 4 deletions trunk/drivers/media/video/ov772x.c
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ static const struct ov772x_win_size *ov772x_select_win(u32 width, u32 height)
}

static int ov772x_set_params(struct i2c_client *client,
u32 width, u32 height, u32 pixfmt)
u32 *width, u32 *height, u32 pixfmt)
{
struct ov772x_priv *priv = to_ov772x(client);
int ret = -EINVAL;
Expand All @@ -829,7 +829,7 @@ static int ov772x_set_params(struct i2c_client *client,
/*
* select win
*/
priv->win = ov772x_select_win(width, height);
priv->win = ov772x_select_win(*width, *height);

/*
* reset hardware
Expand Down Expand Up @@ -941,6 +941,9 @@ static int ov772x_set_params(struct i2c_client *client,
goto ov772x_set_fmt_error;
}

*width = priv->win->width;
*height = priv->win->height;

return ret;

ov772x_set_fmt_error:
Expand All @@ -961,7 +964,7 @@ static int ov772x_set_crop(struct soc_camera_device *icd,
if (!priv->fmt)
return -EINVAL;

return ov772x_set_params(client, rect->width, rect->height,
return ov772x_set_params(client, &rect->width, &rect->height,
priv->fmt->fourcc);
}

Expand All @@ -970,7 +973,7 @@ static int ov772x_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *f)
struct i2c_client *client = sd->priv;
struct v4l2_pix_format *pix = &f->fmt.pix;

return ov772x_set_params(client, pix->width, pix->height,
return ov772x_set_params(client, &pix->width, &pix->height,
pix->pixelformat);
}

Expand Down

0 comments on commit 9949812

Please sign in to comment.