summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/ov772x.c
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
commit50dda2d882c41d334002fb2437c66080c5d87080 (patch)
treea6fb85289b7fda5cfec709738fb996d6450274be /linux/drivers/media/video/ov772x.c
parent5eccdb2f169fdba3dcf0eef1f8c87a8232fa3cf0 (diff)
downloadmediapointer-dvb-s2-50dda2d882c41d334002fb2437c66080c5d87080.tar.gz
mediapointer-dvb-s2-50dda2d882c41d334002fb2437c66080c5d87080.tar.bz2
ov772x: S_CROP must return actually configured geometry
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> V4L2 drivers are allowed to configure a geometry different than what has been requested by the user with S_CROP, but then they have to adjust the input rectangle accordingly. Fix ov772x to comply with this requirement. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Priority: low --- drivers/media/video/ov772x.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
Diffstat (limited to 'linux/drivers/media/video/ov772x.c')
-rw-r--r--linux/drivers/media/video/ov772x.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/linux/drivers/media/video/ov772x.c b/linux/drivers/media/video/ov772x.c
index a9f9c04c1..700f655fd 100644
--- a/linux/drivers/media/video/ov772x.c
+++ b/linux/drivers/media/video/ov772x.c
@@ -960,12 +960,18 @@ static int ov772x_set_crop(struct soc_camera_device *icd,
{
struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
struct ov772x_priv *priv = to_ov772x(client);
+ int ret;
if (!priv->fmt)
return -EINVAL;
- return ov772x_set_params(client, &rect->width, &rect->height,
- priv->fmt->fourcc);
+ ret = ov772x_set_params(client, &rect->width, &rect->height,
+ priv->fmt->fourcc);
+ if (!ret) {
+ rect->left = 0;
+ rect->top = 0;
+ }
+ return ret;
}
static int ov772x_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *f)