aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mt9v022.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/mt9v022.c')
-rw-r--r--drivers/media/video/mt9v022.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c
index be20d312b1dc..dbdcc86ae50d 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,
364{ 364{
365 struct v4l2_pix_format *pix = &f->fmt.pix; 365 struct v4l2_pix_format *pix = &f->fmt.pix;
366 366
367 if (pix->height < 32 + icd->y_skip_top) 367 v4l_bound_align_image(&pix->width, 48, 752, 2 /* ? */,
368 pix->height = 32 + icd->y_skip_top; 368 &pix->height, 32 + icd->y_skip_top,
369 if (pix->height > 480 + icd->y_skip_top) 369 480 + icd->y_skip_top, 0, 0);
370 pix->height = 480 + icd->y_skip_top;
371 if (pix->width < 48)
372 pix->width = 48;
373 if (pix->width > 752)
374 pix->width = 752;
375 pix->width &= ~0x03; /* ? */
376 370
377 return 0; 371 return 0;
378} 372}