OSDN Git Service

media: atomisp: ov2680: Drop MAX_FMTS define
authorHans de Goede <hdegoede@redhat.com>
Fri, 13 Jan 2023 15:51:54 +0000 (16:51 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Wed, 8 Feb 2023 07:24:34 +0000 (08:24 +0100)
The ov2680 only supports a single format, there is no need to
use a define for this.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
drivers/staging/media/atomisp/i2c/ov2680.h

index b139c41..0e51a5f 100644 (file)
@@ -680,7 +680,8 @@ static int ov2680_enum_mbus_code(struct v4l2_subdev *sd,
                                 struct v4l2_subdev_state *sd_state,
                                 struct v4l2_subdev_mbus_code_enum *code)
 {
-       if (code->index >= MAX_FMTS)
+       /* We support only a single format */
+       if (code->index)
                return -EINVAL;
 
        code->code = MEDIA_BUS_FMT_SBGGR10_1X10;
index adf3835..feb8ad0 100644 (file)
@@ -46,8 +46,6 @@
 
 #define OV2680_FOCAL_LENGTH_NUM        334     /*3.34mm*/
 
-#define MAX_FMTS               1
-
 #define OV2680_INTEGRATION_TIME_MARGIN 8
 #define OV2680_ID      0x2680