diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2009-05-30 21:45:46 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-23 03:21:19 -0300 |
commit | 653dc59b6468c2ba51f3b4aee609daa8f67d3e3a (patch) | |
tree | 0393e9e767257d0696e8d27b8ba7b3b9f6026905 /drivers/media/video/mt9v022.c | |
parent | 2449afcbcc654dbaa9dabeda9daecb69719b0aaa (diff) | |
download | kernel_samsung_smdk4412-653dc59b6468c2ba51f3b4aee609daa8f67d3e3a.tar.gz kernel_samsung_smdk4412-653dc59b6468c2ba51f3b4aee609daa8f67d3e3a.tar.bz2 kernel_samsung_smdk4412-653dc59b6468c2ba51f3b4aee609daa8f67d3e3a.zip |
V4L/DVB (11910): mt9: Use v4l bounding/alignment function
The v4l function has a better algorithm for aligning image size.
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/mt9v022.c')
-rw-r--r-- | drivers/media/video/mt9v022.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c index be20d312b1d..dbdcc86ae50 100644 --- a/drivers/media/video/mt9v022.c +++ b/drivers/media/video/mt9v022.c @@ -364,15 +364,9 @@ static int mt9v022_try_fmt(struct soc_camera_device *icd, { struct v4l2_pix_format *pix = &f->fmt.pix; - if (pix->height < 32 + icd->y_skip_top) - pix->height = 32 + icd->y_skip_top; - if (pix->height > 480 + icd->y_skip_top) - pix->height = 480 + icd->y_skip_top; - if (pix->width < 48) - pix->width = 48; - if (pix->width > 752) - pix->width = 752; - pix->width &= ~0x03; /* ? */ + v4l_bound_align_image(&pix->width, 48, 752, 2 /* ? */, + &pix->height, 32 + icd->y_skip_top, + 480 + icd->y_skip_top, 0, 0); return 0; } |