aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/vivi.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-07-01 09:56:10 +0200
committerIngo Molnar <mingo@elte.hu>2009-07-01 09:56:26 +0200
commit087021ba41e9481202103d51d3dd0c4706899a2b (patch)
treebf5d67420fd176682a1f8f1e9342ad397c23937a /drivers/media/video/vivi.c
parentfb9c818873a788c5c01c9868cc6050df96e2c7df (diff)
parente83c2b0ff325f52dda1aff3572d0e1516216c54b (diff)
Merge branch 'linus' into perfcounters/urgent
Merge reason: this branch was on a .30-ish base before, update it to an almost-.31-rc2 upstream base to pick up fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/media/video/vivi.c')
-rw-r--r--drivers/media/video/vivi.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index fbfefae7886..cd726685846 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -883,15 +883,8 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
maxh = norm_maxh();
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 =