summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88/cx88-video.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-06-06 08:15:26 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-06 08:15:26 -0300
commita54e4ff7ad973562ecb961a02ea8da66e2334aef (patch)
treefe475f0216d4971e771364a4fce63e759fd858ac /linux/drivers/media/video/cx88/cx88-video.c
parentab62c90c3f2b6debe4c45c66aa08b5a65039e40e (diff)
parentd336dddd42e43b5465cd58b5a4812011805905df (diff)
downloadmediapointer-dvb-s2-a54e4ff7ad973562ecb961a02ea8da66e2334aef.tar.gz
mediapointer-dvb-s2-a54e4ff7ad973562ecb961a02ea8da66e2334aef.tar.bz2
merge: http://kernellabs.com/hg/~dheitmueller/misc-fixes-2
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-video.c')
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index 2dfa4c9c3..70b086fb7 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -1339,15 +1339,8 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
}
f->fmt.pix.field = field;
- if (f->fmt.pix.height < 32)
- f->fmt.pix.height = 32;
- if (f->fmt.pix.height > maxh)
- f->fmt.pix.height = maxh;
- if (f->fmt.pix.width < 48)
- f->fmt.pix.width = 48;
- if (f->fmt.pix.width > maxw)
- f->fmt.pix.width = maxw;
- f->fmt.pix.width &= ~0x03;
+ v4l_bound_align_image(&f->fmt.pix.width, 48, maxw, 2,
+ &f->fmt.pix.height, 32, maxh, 0, 0);
f->fmt.pix.bytesperline =
(f->fmt.pix.width * fmt->depth) >> 3;
f->fmt.pix.sizeimage =