Commit 34b1df99 authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Mauro Carvalho Chehab

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.comSigned-off-by: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: default avatarNiklas S\xF6derlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 3d5831a4
......@@ -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,
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment