summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/microchip
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-10-23 23:40:06 +0200
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-11-23 18:22:52 +0100
commit098a1eed5daeb62e2c974f6c37d3b0d582c5586e (patch)
treeb79e5da9c641cca2cba6f641113bb04965645808 /drivers/media/platform/microchip
parentmedia: atmel-isi: Use accessors for pad config 'try_*' fields (diff)
downloadlinux-098a1eed5daeb62e2c974f6c37d3b0d582c5586e.tar.xz
linux-098a1eed5daeb62e2c974f6c37d3b0d582c5586e.zip
media: microchip-isc: 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/platform/microchip')
-rw-r--r--drivers/media/platform/microchip/microchip-isc-base.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/platform/microchip/microchip-isc-base.c b/drivers/media/platform/microchip/microchip-isc-base.c
index 1f8528844497..a901be02e2f6 100644
--- a/drivers/media/platform/microchip/microchip-isc-base.c
+++ b/drivers/media/platform/microchip/microchip-isc-base.c
@@ -854,6 +854,8 @@ static int isc_try_configure_pipeline(struct isc_device *isc)
static void isc_try_fse(struct isc_device *isc,
struct v4l2_subdev_state *sd_state)
{
+ struct v4l2_rect *try_crop =
+ v4l2_subdev_get_pad_crop(isc->current_subdev->sd, sd_state, 0);
struct v4l2_subdev_frame_size_enum fse = {
.which = V4L2_SUBDEV_FORMAT_TRY,
};
@@ -875,11 +877,11 @@ static void isc_try_fse(struct isc_device *isc,
* just use the maximum ISC can receive.
*/
if (ret) {
- sd_state->pads->try_crop.width = isc->max_width;
- sd_state->pads->try_crop.height = isc->max_height;
+ try_crop->width = isc->max_width;
+ try_crop->height = isc->max_height;
} else {
- sd_state->pads->try_crop.width = fse.max_width;
- sd_state->pads->try_crop.height = fse.max_height;
+ try_crop->width = fse.max_width;
+ try_crop->height = fse.max_height;
}
}