From 14a62d04d72cd351ee77462b909e1419f120848b Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 16 Dec 2008 20:36:13 -0300 Subject: [PATCH] --- yaml --- r: 124415 b: refs/heads/master c: cf8c91c3e77cc26c43cfe6fc47e649b685736259 h: refs/heads/master i: 124413: b78aadfbf902d60f383302d1180e48542349da30 124411: 369a757fc519027cd430b7c0239f3eb72f06945e 124407: ca442cc46f7fa49bcec40b342538c432a662f771 124399: 6ee56ecd4df24770a7efb262b42da03ca20062e8 124383: 449f0a4c958dec1bffbec80f7552ba8195774a8b 124351: 391805d126dc584a1760bfd46512c67a6df4a2fe 124287: da185c3377a9a58922f8b3c052675964f5c4e566 124159: f3ab620f97dcb258ab299c2d96a11f96ea0fe268 123903: 85b7539ed3a0ddff9ae94a6a53567e1135b2094c v: v3 --- [refs] | 2 +- trunk/drivers/media/video/em28xx/em28xx-video.c | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 4aa94d9a2157..17f4ea4d9313 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 29b59417c514a2c5291abb4e3a42e5245ffe6058 +refs/heads/master: cf8c91c3e77cc26c43cfe6fc47e649b685736259 diff --git a/trunk/drivers/media/video/em28xx/em28xx-video.c b/trunk/drivers/media/video/em28xx/em28xx-video.c index 2d88afefecf5..1681af192b02 100644 --- a/trunk/drivers/media/video/em28xx/em28xx-video.c +++ b/trunk/drivers/media/video/em28xx/em28xx-video.c @@ -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)) @@ -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; }