diff options
Diffstat (limited to 'drivers/media/video/mt9m001.c')
-rw-r--r-- | drivers/media/video/mt9m001.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/media/video/mt9m001.c b/drivers/media/video/mt9m001.c index 459c04cbf69d..4d794b42d6cd 100644 --- a/drivers/media/video/mt9m001.c +++ b/drivers/media/video/mt9m001.c | |||
@@ -280,15 +280,9 @@ static int mt9m001_try_fmt(struct soc_camera_device *icd, | |||
280 | { | 280 | { |
281 | struct v4l2_pix_format *pix = &f->fmt.pix; | 281 | struct v4l2_pix_format *pix = &f->fmt.pix; |
282 | 282 | ||
283 | if (pix->height < 32 + icd->y_skip_top) | 283 | v4l_bound_align_image(&pix->width, 48, 1280, 1, |
284 | pix->height = 32 + icd->y_skip_top; | 284 | &pix->height, 32 + icd->y_skip_top, |
285 | if (pix->height > 1024 + icd->y_skip_top) | 285 | 1024 + icd->y_skip_top, 0, 0); |
286 | pix->height = 1024 + icd->y_skip_top; | ||
287 | if (pix->width < 48) | ||
288 | pix->width = 48; | ||
289 | if (pix->width > 1280) | ||
290 | pix->width = 1280; | ||
291 | pix->width &= ~0x01; /* has to be even, unsure why was ~3 */ | ||
292 | 286 | ||
293 | return 0; | 287 | return 0; |
294 | } | 288 | } |