]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00237706: mxc_v4l2_capture: ov5640: correct the behavior of ENUM_FMT
authorSheng Nan <b38800@freescale.com>
Wed, 19 Dec 2012 09:27:42 +0000 (17:27 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:50 +0000 (08:35 +0200)
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>
drivers/media/video/mxc/capture/ov5640.c

index 813fd8003bbf39b6b96d2c999f5729dafe4d20d9..c816833ecfa44b92c47d4b784646fcf4f77cdf9f 100644 (file)
@@ -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;