From 8b294385fb393c8d1305cb680e5a71ce82b33208 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Sat, 30 May 2009 21:45:46 -0300 Subject: [PATCH] --- yaml --- r: 153949 b: refs/heads/master c: bc44fc061ea1f2b7918ec0bb55013b8054c81752 h: refs/heads/master i: 153947: 305f3105a0db18190b4bd05acc23a3305e28b0f7 v: v3 --- [refs] | 2 +- trunk/drivers/media/video/sh_mobile_ceu_camera.c | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 22278c5d4df6..edb39d178bc3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4a6b8df2133c1f218a503e0432a9e6cc3d461a30 +refs/heads/master: bc44fc061ea1f2b7918ec0bb55013b8054c81752 diff --git a/trunk/drivers/media/video/sh_mobile_ceu_camera.c b/trunk/drivers/media/video/sh_mobile_ceu_camera.c index d369e8409ab8..0db88a53d92c 100644 --- a/trunk/drivers/media/video/sh_mobile_ceu_camera.c +++ b/trunk/drivers/media/video/sh_mobile_ceu_camera.c @@ -689,16 +689,8 @@ static int sh_mobile_ceu_try_fmt(struct soc_camera_device *icd, /* FIXME: calculate using depth and bus width */ - if (f->fmt.pix.height < 4) - f->fmt.pix.height = 4; - if (f->fmt.pix.height > 1920) - f->fmt.pix.height = 1920; - if (f->fmt.pix.width < 2) - f->fmt.pix.width = 2; - if (f->fmt.pix.width > 2560) - f->fmt.pix.width = 2560; - f->fmt.pix.width &= ~0x01; - f->fmt.pix.height &= ~0x03; + v4l_bound_align_image(&f->fmt.pix.width, 2, 2560, 1, + &f->fmt.pix.height, 4, 1920, 2, 0); f->fmt.pix.bytesperline = f->fmt.pix.width * DIV_ROUND_UP(xlate->host_fmt->depth, 8);