aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mt9t031.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-07-03 18:13:18 -0400
committerTejun Heo <tj@kernel.org>2009-07-03 18:13:18 -0400
commitc43768cbb7655ea5ff782ae250f6e2ef4297cf98 (patch)
tree3982e41dde3eecaa3739a5d1a8ed18d04bd74f01 /drivers/media/video/mt9t031.c
parent1a8dd307cc0a2119be4e578c517795464e6dabba (diff)
parent746a99a5af60ee676afa2ba469ccd1373493c7e7 (diff)
Merge branch 'master' into for-next
Pull linus#master to merge PER_CPU_DEF_ATTRIBUTES and alpha build fix changes. As alpha in percpu tree uses 'weak' attribute instead of inline assembly, there's no need for __used attribute. Conflicts: arch/alpha/include/asm/percpu.h arch/mn10300/kernel/vmlinux.lds.S include/linux/percpu-defs.h
Diffstat (limited to 'drivers/media/video/mt9t031.c')
-rw-r--r--drivers/media/video/mt9t031.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/media/video/mt9t031.c b/drivers/media/video/mt9t031.c
index f72aeb7c4deb..4207fb342670 100644
--- a/drivers/media/video/mt9t031.c
+++ b/drivers/media/video/mt9t031.c
@@ -385,17 +385,9 @@ static int mt9t031_try_fmt(struct soc_camera_device *icd,
385{ 385{
386 struct v4l2_pix_format *pix = &f->fmt.pix; 386 struct v4l2_pix_format *pix = &f->fmt.pix;
387 387
388 if (pix->height < MT9T031_MIN_HEIGHT) 388 v4l_bound_align_image(
389 pix->height = MT9T031_MIN_HEIGHT; 389 &pix->width, MT9T031_MIN_WIDTH, MT9T031_MAX_WIDTH, 1,
390 if (pix->height > MT9T031_MAX_HEIGHT) 390 &pix->height, MT9T031_MIN_HEIGHT, MT9T031_MAX_HEIGHT, 1, 0);
391 pix->height = MT9T031_MAX_HEIGHT;
392 if (pix->width < MT9T031_MIN_WIDTH)
393 pix->width = MT9T031_MIN_WIDTH;
394 if (pix->width > MT9T031_MAX_WIDTH)
395 pix->width = MT9T031_MAX_WIDTH;
396
397 pix->width &= ~0x01; /* has to be even */
398 pix->height &= ~0x01; /* has to be even */
399 391
400 return 0; 392 return 0;
401} 393}