From 4357ab901cef1987a2ab43e0e21047a7c128318e Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Sat, 30 May 2009 21:45:46 -0300 Subject: [PATCH] --- yaml --- r: 153955 b: refs/heads/master c: 2449afcbcc654dbaa9dabeda9daecb69719b0aaa h: refs/heads/master i: 153953: aaa9c5ddcc4d2cec543c48580bc4407cb54875d1 153951: 63356c2f09dd70981e4a67758a84259cc9af61d6 v: v3 --- [refs] | 2 +- trunk/drivers/media/video/cx23885/cx23885-video.c | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 7ac309467aad..7890275e5f53 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1c657a99fd655c0daa7450854a914d21c1da805c +refs/heads/master: 2449afcbcc654dbaa9dabeda9daecb69719b0aaa diff --git a/trunk/drivers/media/video/cx23885/cx23885-video.c b/trunk/drivers/media/video/cx23885/cx23885-video.c index 66bbd2e71105..70836af3ab48 100644 --- a/trunk/drivers/media/video/cx23885/cx23885-video.c +++ b/trunk/drivers/media/video/cx23885/cx23885-video.c @@ -963,15 +963,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 =