Commit eb9163d3 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

[media] v4l: vsp1: Constify operation structures

The structures are never modified, make them const.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent e98c59dd
...@@ -249,7 +249,7 @@ static int bru_set_selection(struct v4l2_subdev *subdev, ...@@ -249,7 +249,7 @@ static int bru_set_selection(struct v4l2_subdev *subdev,
return 0; return 0;
} }
static struct v4l2_subdev_pad_ops bru_pad_ops = { static const struct v4l2_subdev_pad_ops bru_pad_ops = {
.init_cfg = vsp1_entity_init_cfg, .init_cfg = vsp1_entity_init_cfg,
.enum_mbus_code = bru_enum_mbus_code, .enum_mbus_code = bru_enum_mbus_code,
.enum_frame_size = bru_enum_frame_size, .enum_frame_size = bru_enum_frame_size,
...@@ -259,7 +259,7 @@ static struct v4l2_subdev_pad_ops bru_pad_ops = { ...@@ -259,7 +259,7 @@ static struct v4l2_subdev_pad_ops bru_pad_ops = {
.set_selection = bru_set_selection, .set_selection = bru_set_selection,
}; };
static struct v4l2_subdev_ops bru_ops = { static const struct v4l2_subdev_ops bru_ops = {
.pad = &bru_pad_ops, .pad = &bru_pad_ops,
}; };
......
...@@ -107,7 +107,7 @@ static int hsit_set_format(struct v4l2_subdev *subdev, ...@@ -107,7 +107,7 @@ static int hsit_set_format(struct v4l2_subdev *subdev,
return 0; return 0;
} }
static struct v4l2_subdev_pad_ops hsit_pad_ops = { static const struct v4l2_subdev_pad_ops hsit_pad_ops = {
.init_cfg = vsp1_entity_init_cfg, .init_cfg = vsp1_entity_init_cfg,
.enum_mbus_code = hsit_enum_mbus_code, .enum_mbus_code = hsit_enum_mbus_code,
.enum_frame_size = hsit_enum_frame_size, .enum_frame_size = hsit_enum_frame_size,
...@@ -115,7 +115,7 @@ static struct v4l2_subdev_pad_ops hsit_pad_ops = { ...@@ -115,7 +115,7 @@ static struct v4l2_subdev_pad_ops hsit_pad_ops = {
.set_fmt = hsit_set_format, .set_fmt = hsit_set_format,
}; };
static struct v4l2_subdev_ops hsit_ops = { static const struct v4l2_subdev_ops hsit_ops = {
.pad = &hsit_pad_ops, .pad = &hsit_pad_ops,
}; };
......
...@@ -104,7 +104,7 @@ static int lif_set_format(struct v4l2_subdev *subdev, ...@@ -104,7 +104,7 @@ static int lif_set_format(struct v4l2_subdev *subdev,
return 0; return 0;
} }
static struct v4l2_subdev_pad_ops lif_pad_ops = { static const struct v4l2_subdev_pad_ops lif_pad_ops = {
.init_cfg = vsp1_entity_init_cfg, .init_cfg = vsp1_entity_init_cfg,
.enum_mbus_code = lif_enum_mbus_code, .enum_mbus_code = lif_enum_mbus_code,
.enum_frame_size = lif_enum_frame_size, .enum_frame_size = lif_enum_frame_size,
...@@ -112,7 +112,7 @@ static struct v4l2_subdev_pad_ops lif_pad_ops = { ...@@ -112,7 +112,7 @@ static struct v4l2_subdev_pad_ops lif_pad_ops = {
.set_fmt = lif_set_format, .set_fmt = lif_set_format,
}; };
static struct v4l2_subdev_ops lif_ops = { static const struct v4l2_subdev_ops lif_ops = {
.pad = &lif_pad_ops, .pad = &lif_pad_ops,
}; };
......
...@@ -147,11 +147,11 @@ static int lut_set_format(struct v4l2_subdev *subdev, ...@@ -147,11 +147,11 @@ static int lut_set_format(struct v4l2_subdev *subdev,
* V4L2 Subdevice Operations * V4L2 Subdevice Operations
*/ */
static struct v4l2_subdev_core_ops lut_core_ops = { static const struct v4l2_subdev_core_ops lut_core_ops = {
.ioctl = lut_ioctl, .ioctl = lut_ioctl,
}; };
static struct v4l2_subdev_pad_ops lut_pad_ops = { static const struct v4l2_subdev_pad_ops lut_pad_ops = {
.init_cfg = vsp1_entity_init_cfg, .init_cfg = vsp1_entity_init_cfg,
.enum_mbus_code = lut_enum_mbus_code, .enum_mbus_code = lut_enum_mbus_code,
.enum_frame_size = lut_enum_frame_size, .enum_frame_size = lut_enum_frame_size,
...@@ -159,7 +159,7 @@ static struct v4l2_subdev_pad_ops lut_pad_ops = { ...@@ -159,7 +159,7 @@ static struct v4l2_subdev_pad_ops lut_pad_ops = {
.set_fmt = lut_set_format, .set_fmt = lut_set_format,
}; };
static struct v4l2_subdev_ops lut_ops = { static const struct v4l2_subdev_ops lut_ops = {
.core = &lut_core_ops, .core = &lut_core_ops,
.pad = &lut_pad_ops, .pad = &lut_pad_ops,
}; };
......
...@@ -38,7 +38,7 @@ static inline void vsp1_rpf_write(struct vsp1_rwpf *rpf, ...@@ -38,7 +38,7 @@ static inline void vsp1_rpf_write(struct vsp1_rwpf *rpf,
* V4L2 Subdevice Operations * V4L2 Subdevice Operations
*/ */
static struct v4l2_subdev_ops rpf_ops = { static const struct v4l2_subdev_ops rpf_ops = {
.pad = &vsp1_rwpf_pad_ops, .pad = &vsp1_rwpf_pad_ops,
}; };
......
...@@ -239,7 +239,7 @@ static int sru_set_format(struct v4l2_subdev *subdev, ...@@ -239,7 +239,7 @@ static int sru_set_format(struct v4l2_subdev *subdev,
return 0; return 0;
} }
static struct v4l2_subdev_pad_ops sru_pad_ops = { static const struct v4l2_subdev_pad_ops sru_pad_ops = {
.init_cfg = vsp1_entity_init_cfg, .init_cfg = vsp1_entity_init_cfg,
.enum_mbus_code = sru_enum_mbus_code, .enum_mbus_code = sru_enum_mbus_code,
.enum_frame_size = sru_enum_frame_size, .enum_frame_size = sru_enum_frame_size,
...@@ -247,7 +247,7 @@ static struct v4l2_subdev_pad_ops sru_pad_ops = { ...@@ -247,7 +247,7 @@ static struct v4l2_subdev_pad_ops sru_pad_ops = {
.set_fmt = sru_set_format, .set_fmt = sru_set_format,
}; };
static struct v4l2_subdev_ops sru_ops = { static const struct v4l2_subdev_ops sru_ops = {
.pad = &sru_pad_ops, .pad = &sru_pad_ops,
}; };
......
...@@ -226,7 +226,7 @@ static int uds_set_format(struct v4l2_subdev *subdev, ...@@ -226,7 +226,7 @@ static int uds_set_format(struct v4l2_subdev *subdev,
* V4L2 Subdevice Operations * V4L2 Subdevice Operations
*/ */
static struct v4l2_subdev_pad_ops uds_pad_ops = { static const struct v4l2_subdev_pad_ops uds_pad_ops = {
.init_cfg = vsp1_entity_init_cfg, .init_cfg = vsp1_entity_init_cfg,
.enum_mbus_code = uds_enum_mbus_code, .enum_mbus_code = uds_enum_mbus_code,
.enum_frame_size = uds_enum_frame_size, .enum_frame_size = uds_enum_frame_size,
...@@ -234,7 +234,7 @@ static struct v4l2_subdev_pad_ops uds_pad_ops = { ...@@ -234,7 +234,7 @@ static struct v4l2_subdev_pad_ops uds_pad_ops = {
.set_fmt = uds_set_format, .set_fmt = uds_set_format,
}; };
static struct v4l2_subdev_ops uds_ops = { static const struct v4l2_subdev_ops uds_ops = {
.pad = &uds_pad_ops, .pad = &uds_pad_ops,
}; };
......
...@@ -696,7 +696,7 @@ static void vsp1_video_stop_streaming(struct vb2_queue *vq) ...@@ -696,7 +696,7 @@ static void vsp1_video_stop_streaming(struct vb2_queue *vq)
spin_unlock_irqrestore(&video->irqlock, flags); spin_unlock_irqrestore(&video->irqlock, flags);
} }
static struct vb2_ops vsp1_video_queue_qops = { static const struct vb2_ops vsp1_video_queue_qops = {
.queue_setup = vsp1_video_queue_setup, .queue_setup = vsp1_video_queue_setup,
.buf_prepare = vsp1_video_buffer_prepare, .buf_prepare = vsp1_video_buffer_prepare,
.buf_queue = vsp1_video_buffer_queue, .buf_queue = vsp1_video_buffer_queue,
...@@ -913,7 +913,7 @@ static int vsp1_video_release(struct file *file) ...@@ -913,7 +913,7 @@ static int vsp1_video_release(struct file *file)
return 0; return 0;
} }
static struct v4l2_file_operations vsp1_video_fops = { static const struct v4l2_file_operations vsp1_video_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.unlocked_ioctl = video_ioctl2, .unlocked_ioctl = video_ioctl2,
.open = vsp1_video_open, .open = vsp1_video_open,
......
...@@ -62,11 +62,11 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable) ...@@ -62,11 +62,11 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable)
* V4L2 Subdevice Operations * V4L2 Subdevice Operations
*/ */
static struct v4l2_subdev_video_ops wpf_video_ops = { static const struct v4l2_subdev_video_ops wpf_video_ops = {
.s_stream = wpf_s_stream, .s_stream = wpf_s_stream,
}; };
static struct v4l2_subdev_ops wpf_ops = { static const struct v4l2_subdev_ops wpf_ops = {
.video = &wpf_video_ops, .video = &wpf_video_ops,
.pad = &vsp1_rwpf_pad_ops, .pad = &vsp1_rwpf_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