summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vladimir.zapolskiy@linaro.org>2026-02-26 16:37:38 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2026-03-11 03:05:36 +0300
commit4ab1e06143290f9ffcddeab72abede3a677def1f (patch)
treed8423e61607fe5c8453997423158ca997c0e7e38 /drivers
parentd935219d19daf1d43d116e14c253a17bb23cd480 (diff)
downloadlinux-4ab1e06143290f9ffcddeab72abede3a677def1f.tar.xz
media: i2c: og01a1b: Use generic v4l2_subdev_get_fmt() to get format
The generic v4l2_subdev_get_fmt() helper function can be utilized to get the setup device format instead of the custom one. Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/i2c/og01a1b.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/media/i2c/og01a1b.c b/drivers/media/i2c/og01a1b.c
index c0ab230940f8..34d23413522d 100644
--- a/drivers/media/i2c/og01a1b.c
+++ b/drivers/media/i2c/og01a1b.c
@@ -701,21 +701,6 @@ static int og01a1b_set_format(struct v4l2_subdev *sd,
return 0;
}
-static int og01a1b_get_format(struct v4l2_subdev *sd,
- struct v4l2_subdev_state *sd_state,
- struct v4l2_subdev_format *fmt)
-{
- struct og01a1b *og01a1b = to_og01a1b(sd);
-
- if (fmt->which == V4L2_SUBDEV_FORMAT_TRY)
- fmt->format = *v4l2_subdev_state_get_format(sd_state,
- fmt->pad);
- else
- og01a1b_update_pad_format(og01a1b->cur_mode, &fmt->format);
-
- return 0;
-}
-
static int og01a1b_enum_mbus_code(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_mbus_code_enum *code)
@@ -771,7 +756,7 @@ static const struct v4l2_subdev_video_ops og01a1b_video_ops = {
static const struct v4l2_subdev_pad_ops og01a1b_pad_ops = {
.set_fmt = og01a1b_set_format,
- .get_fmt = og01a1b_get_format,
+ .get_fmt = v4l2_subdev_get_fmt,
.enum_mbus_code = og01a1b_enum_mbus_code,
.enum_frame_size = og01a1b_enum_frame_size,
.enable_streams = og01a1b_enable_streams,