Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331236
b: refs/heads/master
c: 94c15b5
h: refs/heads/master
v: v3
  • Loading branch information
Sylwester Nawrocki authored and Mauro Carvalho Chehab committed Oct 2, 2012
1 parent 77cbc45 commit f9666ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 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: 7fb89eca0f2ad21f6e77f3411cb220ed94f340df
refs/heads/master: 94c15b5e6755711af6dd81bde0f8396e24b75dc2
11 changes: 4 additions & 7 deletions trunk/drivers/media/i2c/s5k6aa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,10 +1061,9 @@ __s5k6aa_get_crop_rect(struct s5k6aa *s5k6aa, struct v4l2_subdev_fh *fh,
{
if (which == V4L2_SUBDEV_FORMAT_ACTIVE)
return &s5k6aa->ccd_rect;
if (which == V4L2_SUBDEV_FORMAT_TRY)
return v4l2_subdev_get_try_crop(fh, 0);

return NULL;
WARN_ON(which != V4L2_SUBDEV_FORMAT_TRY);
return v4l2_subdev_get_try_crop(fh, 0);
}

static void s5k6aa_try_format(struct s5k6aa *s5k6aa,
Expand Down Expand Up @@ -1169,12 +1168,10 @@ static int s5k6aa_get_crop(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
struct v4l2_rect *rect;

memset(crop->reserved, 0, sizeof(crop->reserved));
mutex_lock(&s5k6aa->lock);

mutex_lock(&s5k6aa->lock);
rect = __s5k6aa_get_crop_rect(s5k6aa, fh, crop->which);
if (rect)
crop->rect = *rect;

crop->rect = *rect;
mutex_unlock(&s5k6aa->lock);

v4l2_dbg(1, debug, sd, "Current crop rectangle: (%d,%d)/%dx%d\n",
Expand Down

0 comments on commit f9666ef

Please sign in to comment.