aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2021-11-27 10:49:44 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-12-14 15:09:14 +0100
commit34b1df99a5d4a6f3c354fd5ff0ddfbf4f67db2bc (patch)
treec5ee3bf2ccacaf136ef17063c921f717821d048e /drivers/staging
parentmedia: msi001: fix possible null-ptr-deref in msi001_probe() (diff)
downloadlinux-dev-34b1df99a5d4a6f3c354fd5ff0ddfbf4f67db2bc.tar.xz
linux-dev-34b1df99a5d4a6f3c354fd5ff0ddfbf4f67db2bc.zip
media: staging: max96712: Constify static v4l2_subdev_ops
The only usage of max96712_subdev_ops is to pass its address to v4l2_i2c_subdev_init() which takes a pointer to const struct v4l2_subdev_ops as argument. Make it const to allow the compiler to put it in read-only memory. Link: https://lore.kernel.org/linux-media/20211127094945.27985-1-rikard.falkeborn@gmail.com Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Reviewed-by: Niklas S\xF6derlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/media/max96712/max96712.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/max96712/max96712.c b/drivers/staging/media/max96712/max96712.c
index 847e2ffd4f53..9bc72d9a858b 100644
--- a/drivers/staging/media/max96712/max96712.c
+++ b/drivers/staging/media/max96712/max96712.c
@@ -250,7 +250,7 @@ static const struct v4l2_subdev_pad_ops max96712_pad_ops = {
.set_fmt = max96712_get_pad_format,
};
-static struct v4l2_subdev_ops max96712_subdev_ops = {
+static const struct v4l2_subdev_ops max96712_subdev_ops = {
.video = &max96712_video_ops,
.pad = &max96712_pad_ops,
};