diff options
Diffstat (limited to 'drivers/media/video/vivi.c')
-rw-r--r-- | drivers/media/video/vivi.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index fbfefae7886f..cd7266858462 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, | |||
883 | maxh = norm_maxh(); | 883 | maxh = norm_maxh(); |
884 | 884 | ||
885 | f->fmt.pix.field = field; | 885 | f->fmt.pix.field = field; |
886 | if (f->fmt.pix.height < 32) | 886 | v4l_bound_align_image(&f->fmt.pix.width, 48, maxw, 2, |
887 | f->fmt.pix.height = 32; | 887 | &f->fmt.pix.height, 32, maxh, 0, 0); |
888 | if (f->fmt.pix.height > maxh) | ||
889 | f->fmt.pix.height = maxh; | ||
890 | if (f->fmt.pix.width < 48) | ||
891 | f->fmt.pix.width = 48; | ||
892 | if (f->fmt.pix.width > maxw) | ||
893 | f->fmt.pix.width = maxw; | ||
894 | f->fmt.pix.width &= ~0x03; | ||
895 | f->fmt.pix.bytesperline = | 888 | f->fmt.pix.bytesperline = |
896 | (f->fmt.pix.width * fmt->depth) >> 3; | 889 | (f->fmt.pix.width * fmt->depth) >> 3; |
897 | f->fmt.pix.sizeimage = | 890 | f->fmt.pix.sizeimage = |