media: i2c: sensor driver remove not necessary check of fmt_code in enum_frame_interval
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com> Change-Id: I2bafbe067054c30cd4e61740365a59d9ff839ae4
This commit is contained in:
@@ -1309,9 +1309,7 @@ static int ar0230_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != PIX_FORMAT)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = PIX_FORMAT;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -927,9 +927,7 @@ static int gc0312_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(gc0312_framesizes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_YUYV8_2X8)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_YUYV8_2X8;
|
||||
fie->width = gc0312_framesizes[fie->index].width;
|
||||
fie->height = gc0312_framesizes[fie->index].height;
|
||||
fie->interval = gc0312_framesizes[fie->index].max_fps;
|
||||
|
||||
@@ -903,9 +903,7 @@ static int gc0329_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(gc0329_framesizes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_YUYV8_2X8)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_YUYV8_2X8;
|
||||
fie->width = gc0329_framesizes[fie->index].width;
|
||||
fie->height = gc0329_framesizes[fie->index].height;
|
||||
fie->interval = gc0329_framesizes[fie->index].max_fps;
|
||||
|
||||
@@ -944,9 +944,7 @@ static int gc032a_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(gc032a_framesizes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_YUYV8_2X8)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_YUYV8_2X8;
|
||||
fie->width = gc032a_framesizes[fie->index].width;
|
||||
fie->height = gc032a_framesizes[fie->index].height;
|
||||
fie->interval = gc032a_framesizes[fie->index].max_fps;
|
||||
|
||||
@@ -908,9 +908,7 @@ static int gc0403_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_SRGGB10_1X10)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_SRGGB10_1X10;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -1700,9 +1700,7 @@ static int gc08a3_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= gc08a3->cfg_num)
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != GC08A3_MEDIA_BUS_FMT)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = GC08A3_MEDIA_BUS_FMT;
|
||||
fie->width = gc08a3->support_modes[fie->index].width;
|
||||
fie->height = gc08a3->support_modes[fie->index].height;
|
||||
fie->interval = gc08a3->support_modes[fie->index].max_fps;
|
||||
|
||||
@@ -1294,9 +1294,7 @@ static int gc2035_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(gc2035_framesizes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_UYVY8_2X8)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_UYVY8_2X8;
|
||||
fie->width = gc2035_framesizes[fie->index].width;
|
||||
fie->height = gc2035_framesizes[fie->index].height;
|
||||
fie->interval = gc2035_framesizes[fie->index].max_fps;
|
||||
|
||||
@@ -2672,9 +2672,7 @@ static int gc2145_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= gc2145->cfg_num)
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_UYVY8_2X8)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_UYVY8_2X8;
|
||||
fie->width = gc2145->framesize_cfg[fie->index].width;
|
||||
fie->height = gc2145->framesize_cfg[fie->index].height;
|
||||
fie->interval = gc2145->framesize_cfg[fie->index].max_fps;
|
||||
|
||||
@@ -1487,9 +1487,7 @@ static int gc2155_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_UYVY8_2X8)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_UYVY8_2X8;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -817,9 +817,7 @@ static int gc2355_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_SRGGB10_1X10)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_SRGGB10_1X10;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -1000,9 +1000,7 @@ static int gc2375h_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= gc2375h->cfg_num)
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_SRGGB10_1X10)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_SRGGB10_1X10;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -778,9 +778,7 @@ static int gc2385_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_SBGGR10_1X10)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -901,9 +901,7 @@ static int gc5024_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= gc5024->cfg_num)
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_SBGGR10_1X10)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -1502,9 +1502,7 @@ static int gc5025_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_SRGGB10_1X10)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_SRGGB10_1X10;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -993,8 +993,7 @@ static int gc5035_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= gc5035->cfg_num)
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_SRGGB10_1X10)
|
||||
return -EINVAL;
|
||||
fie->code = MEDIA_BUS_FMT_SRGGB10_1X10;
|
||||
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
|
||||
@@ -2662,9 +2662,7 @@ static int gc8034_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= gc8034->cfg_num)
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != GC8034_MEDIA_BUS_FMT)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = GC8034_MEDIA_BUS_FMT;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -1445,9 +1445,7 @@ static int imx214_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= imx214->cfg_num)
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != IMX214_MEDIA_BUS_FMT)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = IMX214_MEDIA_BUS_FMT;
|
||||
fie->width = imx214->support_modes[fie->index].width;
|
||||
fie->height = imx214->support_modes[fie->index].height;
|
||||
fie->interval = imx214->support_modes[fie->index].max_fps;
|
||||
|
||||
@@ -1178,9 +1178,7 @@ static int imx317_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= imx317->cfg_num)
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != IMX317_MEDIA_BUS_FMT)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = IMX317_MEDIA_BUS_FMT;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -723,9 +723,7 @@ static int imx323_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != PIX_FORMAT)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = PIX_FORMAT;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -3776,8 +3776,7 @@ static int it6616_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != IT6616_MEDIA_BUS_FMT)
|
||||
return -EINVAL;
|
||||
fie->code = IT6616_MEDIA_BUS_FMT;
|
||||
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
|
||||
@@ -797,9 +797,7 @@ static int jx_h62_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != JX_H62_MEDIA_BUS_FMT)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = JX_H62_MEDIA_BUS_FMT;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -895,8 +895,7 @@ static int jx_h65_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_SBGGR10_1X10)
|
||||
return -EINVAL;
|
||||
fie->code = MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
|
||||
@@ -825,8 +825,7 @@ static int lt6911uxc_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != LT6911UXC_MEDIA_BUS_FMT)
|
||||
return -EINVAL;
|
||||
fie->code = LT6911UXC_MEDIA_BUS_FMT;
|
||||
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
|
||||
@@ -1187,8 +1187,7 @@ static int lt6911uxe_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= lt6911uxe->cfg_num)
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != LT6911UXE_MEDIA_BUS_FMT)
|
||||
return -EINVAL;
|
||||
fie->code = LT6911UXE_MEDIA_BUS_FMT;
|
||||
|
||||
fie->width = lt6911uxe->support_modes[fie->index].width;
|
||||
fie->height = lt6911uxe->support_modes[fie->index].height;
|
||||
|
||||
@@ -820,8 +820,7 @@ static int lt7911d_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != LT7911D_MEDIA_BUS_FMT)
|
||||
return -EINVAL;
|
||||
fie->code = LT7911D_MEDIA_BUS_FMT;
|
||||
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
|
||||
@@ -962,8 +962,7 @@ static int lt7911uxc_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= lt7911uxc->cfg_num)
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != LT7911UXC_MEDIA_BUS_FMT)
|
||||
return -EINVAL;
|
||||
fie->code = LT7911UXC_MEDIA_BUS_FMT;
|
||||
|
||||
fie->width = lt7911uxc->support_modes[fie->index].width;
|
||||
fie->height = lt7911uxc->support_modes[fie->index].height;
|
||||
|
||||
@@ -1223,8 +1223,7 @@ static int lt8619c_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_UYVY8_2X8)
|
||||
return -EINVAL;
|
||||
fie->code = MEDIA_BUS_FMT_UYVY8_2X8;
|
||||
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
|
||||
@@ -764,8 +764,7 @@ static int max96714_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MAX96714_MEDIA_BUS_FMT)
|
||||
return -EINVAL;
|
||||
fie->code = MAX96714_MEDIA_BUS_FMT;
|
||||
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
|
||||
@@ -840,8 +840,7 @@ static int max96722_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MAX96722_MEDIA_BUS_FMT)
|
||||
return -EINVAL;
|
||||
fie->code = MAX96722_MEDIA_BUS_FMT;
|
||||
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
|
||||
@@ -1107,9 +1107,7 @@ static int os08a20_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= os08a20->cfg_num)
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != OS08A20_MEDIA_BUS_FMT)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = OS08A20_MEDIA_BUS_FMT;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -1238,9 +1238,7 @@ static int ov13850_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_SBGGR10_1X10)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -1561,9 +1561,7 @@ static int ov13855_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != OV13855_MEDIA_BUS_FMT)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = OV13855_MEDIA_BUS_FMT;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -1601,9 +1601,7 @@ static int ov16a10_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != OV16A10_MEDIA_BUS_FMT)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = OV16A10_MEDIA_BUS_FMT;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -836,9 +836,7 @@ static int ov2735_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_SBGGR10_1X10)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -1082,9 +1082,7 @@ static int ov5648_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ov5648->cfg_num)
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_SBGGR10_1X10)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -1398,9 +1398,7 @@ static int ov5670_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ov5670->cfg_num)
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_SBGGR10_1X10)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -1154,9 +1154,7 @@ static int ov5695_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_SBGGR10_1X10)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -941,9 +941,7 @@ static int ov7750_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_SBGGR10_1X10)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -2854,9 +2854,7 @@ static int ov8858_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ov8858->cfg_num)
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != OV8858_MEDIA_BUS_FMT)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = OV8858_MEDIA_BUS_FMT;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -927,9 +927,7 @@ static int ov9750_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_SBGGR10_1X10)
|
||||
return -EINVAL;
|
||||
|
||||
fie->code = MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
fie->interval = supported_modes[fie->index].max_fps;
|
||||
|
||||
@@ -1290,8 +1290,7 @@ static int rk628_bt1120_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_UYVY8_2X8)
|
||||
return -EINVAL;
|
||||
fie->code = MEDIA_BUS_FMT_UYVY8_2X8;
|
||||
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
|
||||
@@ -1520,8 +1520,7 @@ static int rk628_csi_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != csi->plat_data->bus_fmt)
|
||||
return -EINVAL;
|
||||
fie->code = csi->plat_data->bus_fmt;
|
||||
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
|
||||
@@ -1064,8 +1064,7 @@ static int s5k3l6xx_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != S5K3L6XX_MEDIA_BUS_FMT)
|
||||
return -EINVAL;
|
||||
fie->code = S5K3L6XX_MEDIA_BUS_FMT;
|
||||
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
|
||||
@@ -945,8 +945,7 @@ static int sc031gs_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != PIX_FORMAT)
|
||||
return -EINVAL;
|
||||
fie->code = PIX_FORMAT;
|
||||
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
|
||||
@@ -875,8 +875,7 @@ static int sc2239_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != PIX_FORMAT)
|
||||
return -EINVAL;
|
||||
fie->code = PIX_FORMAT;
|
||||
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
|
||||
@@ -1748,8 +1748,7 @@ static int tc35874x_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != MEDIA_BUS_FMT_UYVY8_2X8)
|
||||
return -EINVAL;
|
||||
fie->code = MEDIA_BUS_FMT_UYVY8_2X8;
|
||||
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
|
||||
@@ -1002,8 +1002,7 @@ static int thcv244_enum_frame_interval(struct v4l2_subdev *sd,
|
||||
if (fie->index >= ARRAY_SIZE(supported_modes))
|
||||
return -EINVAL;
|
||||
|
||||
if (fie->code != THCV244_MEDIA_BUS_FMT)
|
||||
return -EINVAL;
|
||||
fie->code = THCV244_MEDIA_BUS_FMT;
|
||||
|
||||
fie->width = supported_modes[fie->index].width;
|
||||
fie->height = supported_modes[fie->index].height;
|
||||
|
||||
Reference in New Issue
Block a user