Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124415
b: refs/heads/master
c: cf8c91c
h: refs/heads/master
i:
  124413: b78aadf
  124411: 369a757
  124407: ca442cc
  124399: 6ee56ec
  124383: 449f0a4
  124351: 391805d
  124287: da185c3
  124159: f3ab620
  123903: 85b7539
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Dec 30, 2008
1 parent b86614c commit 14a62d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 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: 29b59417c514a2c5291abb4e3a42e5245ffe6058
refs/heads/master: cf8c91c3e77cc26c43cfe6fc47e649b685736259
13 changes: 5 additions & 8 deletions trunk/drivers/media/video/em28xx/em28xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,19 +730,17 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
/* width must even because of the YUYV format
height must be even because of interlacing */
height &= 0xfffe;
width &= 0xfffe;
width &= 0xfffe;

if (height < 32)
if (unlikely(height < 32))
height = 32;
if (height > maxh)
if (unlikely(height > maxh))
height = maxh;
if (width < 48)
if (unlikely(width < 48))
width = 48;
if (width > maxw)
if (unlikely(width > maxw))
width = maxw;

mutex_lock(&dev->lock);

if (dev->board.is_em2800) {
/* the em2800 can only scale down to 50% */
if (height % (maxh / 2))
Expand Down Expand Up @@ -772,7 +770,6 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
f->fmt.pix.field = V4L2_FIELD_INTERLACED;

mutex_unlock(&dev->lock);
return 0;
}

Expand Down

0 comments on commit 14a62d0

Please sign in to comment.