aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2021-10-05 23:45:01 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-10-08 13:25:42 +0200
commitc96651a00208f80afeb3d093c946b2aa0f2fd2f6 (patch)
tree3020530c7b7e81663e68600687e86f963a4fa875
parent566778bc1da7bad0b2509b4b89176c5c93caf72c (diff)
media: staging/intel-ipu3: Constify static struct v4l2_subdev_internal_ops
The only usage of imgu_subdev_internal_ops is to assign its address to the internal_ops field in the v4l2_subdev struct, which is a pointer to const v4l2_subdev_internal_ops. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--drivers/staging/media/ipu3/ipu3-v4l2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c
index 38a240764509..b723186d2134 100644
--- a/drivers/staging/media/ipu3/ipu3-v4l2.c
+++ b/drivers/staging/media/ipu3/ipu3-v4l2.c
@@ -864,7 +864,7 @@ static int imgu_vidioc_g_meta_fmt(struct file *file, void *fh,
/******************** function pointers ********************/
-static struct v4l2_subdev_internal_ops imgu_subdev_internal_ops = {
+static const struct v4l2_subdev_internal_ops imgu_subdev_internal_ops = {
.open = imgu_subdev_open,
};

Privacy Policy