All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: staging/intel-ipu3: Constify static struct v4l2_subdev_internal_ops
@ 2021-10-05 21:45 Rikard Falkeborn
  0 siblings, 0 replies; only message in thread
From: Rikard Falkeborn @ 2021-10-05 21:45 UTC (permalink / raw)
  To: Sakari Ailus, Mauro Carvalho Chehab
  Cc: Bingbu Cao, Tianshu Qiu, Greg Kroah-Hartman, linux-media,
	linux-staging, linux-kernel, Rikard Falkeborn

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>
---
 drivers/staging/media/ipu3/ipu3-v4l2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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,
 };
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-05 21:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-05 21:45 [PATCH] media: staging/intel-ipu3: Constify static struct v4l2_subdev_internal_ops Rikard Falkeborn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.