summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSheng Nan <b38800@freescale.com>2012-12-19 17:27:42 +0800
committerSheng Nan <b38800@freescale.com>2013-01-09 10:44:15 +0800
commitaeb4138cc90dd52a40b6385c2f5ed4e96baced10 (patch)
tree2ee2178552ea9b5d860f7aaab6c94e02d08472dd /drivers
parent793696959cfbef823f2a55961e676b3453cea7f4 (diff)
ENGR00237706: mxc_v4l2_capture: ov5640: correct the behavior of ENUM_FMT
ov5640 ioctl_enum_fmt_cap only returns value of index = 0; before support other formats, correct the behavior of this ioctl. - ENUM_FMT returns all the supported format. Signed-off-by: Sheng Nan <b38800@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/mxc/capture/ov5640.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/mxc/capture/ov5640.c b/drivers/media/video/mxc/capture/ov5640.c
index 813fd8003bbf..c816833ecfa4 100644
--- a/drivers/media/video/mxc/capture/ov5640.c
+++ b/drivers/media/video/mxc/capture/ov5640.c
@@ -829,7 +829,7 @@ static int ioctl_init(struct v4l2_int_device *s)
static int ioctl_enum_fmt_cap(struct v4l2_int_device *s,
struct v4l2_fmtdesc *fmt)
{
- if (fmt->index > 0) /* only 1 pixelformat support so far */
+ if (fmt->index > ov5640_mode_MAX)
return -EINVAL;
fmt->pixelformat = ov5640_data.pix.pixelformat;