From: Hans de Goede Date: Fri, 13 Jan 2023 15:51:54 +0000 (+0100) Subject: media: atomisp: ov2680: Drop MAX_FMTS define X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bca7822cbc76b22572faf2e17ca9517b68ebeb3e;p=linux.git media: atomisp: ov2680: Drop MAX_FMTS define The ov2680 only supports a single format, there is no need to use a define for this. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c index b139c4167cf9b..0e51a5f83f12c 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2680.c @@ -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; diff --git a/drivers/staging/media/atomisp/i2c/ov2680.h b/drivers/staging/media/atomisp/i2c/ov2680.h index adf38359afbcc..feb8ad055b408 100644 --- a/drivers/staging/media/atomisp/i2c/ov2680.h +++ b/drivers/staging/media/atomisp/i2c/ov2680.h @@ -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