summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2009-08-25 16:46:42 +0200
committerGuennadi Liakhovetski <g.liakhovetski@gmx.de>2009-08-25 16:46:42 +0200
commitbbbc50159e8cab3ba46fe1491657840d91490829 (patch)
tree94702c9cc83a33ea0e71772a16d2a1611e59d814 /linux/drivers/media/video
parent67b6fcc4c0404e94f16820566585bb0ff9891b89 (diff)
downloadmediapointer-dvb-s2-bbbc50159e8cab3ba46fe1491657840d91490829.tar.gz
mediapointer-dvb-s2-bbbc50159e8cab3ba46fe1491657840d91490829.tar.bz2
ov772x: successful S_FMT and S_CROP must update user-provided rectangle
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Priority: low --- drivers/media/video/ov772x.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-)
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/ov772x.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/linux/drivers/media/video/ov772x.c b/linux/drivers/media/video/ov772x.c
index a853c3514..a9f9c04c1 100644
--- a/linux/drivers/media/video/ov772x.c
+++ b/linux/drivers/media/video/ov772x.c
@@ -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;
@@ -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
@@ -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:
@@ -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);
}
@@ -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);
}