summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-09-23 22:49:06 +0300
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2023-10-12 09:46:37 +0200
commit1a6ae627af1477e7dbc081c21102bb5d8889adb1 (patch)
treeef17f90b864904a93454796bd2c868644d170bd3 /drivers/media
parentf4bc9c79a55a40608a405700a574303e4b90b310 (diff)
media: rkisp1: resizer: Constify argument and local variables
Pointers to v4l2_mbus_framefmt and v4l2_rect instances don't need to be modified when configuring the resizer. Make them const. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
index bca111711cee..26f9c16ccc3e 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c
@@ -206,10 +206,10 @@ static void rkisp1_rsz_disable(struct rkisp1_resizer *rsz,
}
static void rkisp1_rsz_config_regs(struct rkisp1_resizer *rsz,
- struct v4l2_rect *sink_y,
- struct v4l2_rect *sink_c,
- struct v4l2_rect *src_y,
- struct v4l2_rect *src_c,
+ const struct v4l2_rect *sink_y,
+ const struct v4l2_rect *sink_c,
+ const struct v4l2_rect *src_y,
+ const struct v4l2_rect *src_c,
enum rkisp1_shadow_regs_when when)
{
u32 ratio, rsz_ctrl = 0;
@@ -270,9 +270,9 @@ static void rkisp1_rsz_config(struct rkisp1_resizer *rsz,
enum rkisp1_shadow_regs_when when)
{
const struct rkisp1_rsz_yuv_mbus_info *sink_yuv_info, *src_yuv_info;
+ const struct v4l2_mbus_framefmt *src_fmt, *sink_fmt;
+ const struct v4l2_rect *sink_crop;
struct v4l2_rect sink_y, sink_c, src_y, src_c;
- struct v4l2_mbus_framefmt *src_fmt, *sink_fmt;
- struct v4l2_rect *sink_crop;
sink_fmt = v4l2_subdev_get_pad_format(&rsz->sd, sd_state,
RKISP1_RSZ_PAD_SINK);