diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-10-23 23:40:10 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-11-23 18:24:32 +0100 |
commit | fd17e3a9a7886ec949ce269a396b67875b51ff45 (patch) | |
tree | 568c28742b8d1c58f5847757da7221fc5efb8688 /drivers/media/i2c/ov2680.c | |
parent | 0623979d8352efe18f83c4fad95a2e61df17b3e7 (diff) |
media: i2c: Use accessors for pad config 'try_*' fields
The 'try_*' fields of the v4l2_subdev_pad_config structure are meant to
be accessed through helper functions. Replace direct access with usage
of the v4l2_subdev_get_pad_format(), v4l2_subdev_get_pad_crop() and
v4l2_subdev_get_pad_compose() helpers.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/i2c/ov2680.c')
-rw-r--r-- | drivers/media/i2c/ov2680.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/i2c/ov2680.c b/drivers/media/i2c/ov2680.c index 72bab0ff8a36..f58fa2eb86ee 100644 --- a/drivers/media/i2c/ov2680.c +++ b/drivers/media/i2c/ov2680.c @@ -760,9 +760,9 @@ static int ov2680_init_cfg(struct v4l2_subdev *sd, { struct ov2680_dev *sensor = to_ov2680_dev(sd); - sd_state->pads[0].try_crop = ov2680_default_crop; + *v4l2_subdev_get_pad_crop(sd, sd_state, 0) = ov2680_default_crop; - ov2680_fill_format(sensor, &sd_state->pads[0].try_fmt, + ov2680_fill_format(sensor, v4l2_subdev_get_pad_format(sd, sd_state, 0), OV2680_DEFAULT_WIDTH, OV2680_DEFAULT_HEIGHT); return 0; } |