aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/mt9m001.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-23 10:40:19 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-23 10:40:19 -0700
commit135aae340d66c5e273af297bbd5178a5e5c458ee (patch)
tree7301bfc6a1c85e74788a2fbcc36eb5b78122df31 /drivers/media/video/mt9m001.c
parent811e42cfba334d27797989ac8b0bea4981cb9581 (diff)
parenteebf8d86acf0db974dfaad8e8285f4e12ca488e2 (diff)
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (62 commits) V4L/DVB (12131): BUGFIX: An incorrect Carrier Recovery Loop optimization table was being V4L/DVB (12130): Fix a redundant compiler warning V4L/DVB (12003): v4l2: Move bounding code outside I2C ifdef block V4L/DVB (11913): cx231xx: TRY_FMT should not actually set anything V4L/DVB (11912): em28xx: Use v4l bounding/alignment function V4L/DVB (11911): cx231xx: Use v4l bounding/alignment function V4L/DVB (11910): mt9: Use v4l bounding/alignment function V4L/DVB (11909): cx23885: Use v4l bounding/alignment function V4L/DVB (11908): w8968cf: Use v4l bounding/alignment function V4L/DVB (11907): cx88: Use v4l bounding/alignment function V4L/DVB (11906): saa7134: Use v4l bounding/alignment function V4L/DVB (11905): vivi: Use v4l bounding/alignment function V4L/DVB (11904): zoran: Use v4l bounding/alignment functiob V4L/DVB (11903): sh_mobile_ceu_camera: Use v4l bounding/alignment function V4L/DVB (11902): pxa-camera: Use v4l bounding/alignment function V4L/DVB (11901): v4l2: Create helper function for bounding and aligning images V4L/DVB (12128): v4l2: update framework documentation. V4L/DVB (12125): v4l2: add new s_config subdev ops and v4l2_i2c_new_subdev_cfg/board calls V4L/DVB (12122): pvrusb2: De-obfuscate code which handles routing schemes V4L/DVB (12121): pvrusb2: Improve handling of routing schemes ...
Diffstat (limited to 'drivers/media/video/mt9m001.c')
-rw-r--r--drivers/media/video/mt9m001.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/media/video/mt9m001.c b/drivers/media/video/mt9m001.c
index 459c04cbf69..4d794b42d6c 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,
{
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 > 1024 + icd->y_skip_top)
- pix->height = 1024 + icd->y_skip_top;
- if (pix->width < 48)
- pix->width = 48;
- if (pix->width > 1280)
- pix->width = 1280;
- pix->width &= ~0x01; /* has to be even, unsure why was ~3 */
+ v4l_bound_align_image(&pix->width, 48, 1280, 1,
+ &pix->height, 32 + icd->y_skip_top,
+ 1024 + icd->y_skip_top, 0, 0);
return 0;
}