Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164226
b: refs/heads/master
c: 123ab62
h: refs/heads/master
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Mauro Carvalho Chehab committed Sep 19, 2009
1 parent eff71ba commit 1fec989
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 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: 904078f16fab80ed1f6adf7f6a0bd166d6b58d07
refs/heads/master: 123ab622c075e2252b46565c81dbf5c0748a82af
14 changes: 12 additions & 2 deletions trunk/drivers/media/video/tw9910.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 1fec989

Please sign in to comment.