From 1fec9898df2ef670b920535c841331f90fc6aa57 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Tue, 25 Aug 2009 11:46:52 -0300 Subject: [PATCH] --- yaml --- r: 164226 b: refs/heads/master c: 123ab622c075e2252b46565c81dbf5c0748a82af h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/media/video/tw9910.c | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 123192fd5ccf..1002e4ad432b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 904078f16fab80ed1f6adf7f6a0bd166d6b58d07 +refs/heads/master: 123ab622c075e2252b46565c81dbf5c0748a82af diff --git a/trunk/drivers/media/video/tw9910.c b/trunk/drivers/media/video/tw9910.c index 7199e0f71b2a..83596cbc9b98 100644 --- a/trunk/drivers/media/video/tw9910.c +++ b/trunk/drivers/media/video/tw9910.c @@ -699,6 +699,11 @@ static int tw9910_set_crop(struct soc_camera_device *icd, if (ret < 0) goto tw9910_set_fmt_error; + rect->width = priv->scale->width; + rect->height = priv->scale->height; + rect->left = 0; + rect->top = 0; + return ret; tw9910_set_fmt_error: @@ -720,7 +725,7 @@ static int tw9910_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *f) .width = pix->width, .height = pix->height, }; - int i; + int i, ret; /* * check color format @@ -732,7 +737,12 @@ static int tw9910_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *f) if (i == ARRAY_SIZE(tw9910_color_fmt)) return -EINVAL; - return tw9910_set_crop(icd, &rect); + ret = tw9910_set_crop(icd, &rect); + if (!ret) { + pix->width = rect.width; + pix->height = rect.height; + } + return ret; } static int tw9910_try_fmt(struct v4l2_subdev *sd, struct v4l2_format *f)