aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2016-06-17 20:11:26 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-06-28 11:03:30 -0400
commiteb9163d3bd2700ea3c6570a07e7548f678211dac (patch)
treef886ee273fb6b02a24d33df8554993c5725ed0bd
parente98c59dd717fddde28193777c4602196b1240e66 (diff)
[media] v4l: vsp1: Constify operation structures
The structures are never modified, make them const. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--drivers/media/platform/vsp1/vsp1_bru.c4
-rw-r--r--drivers/media/platform/vsp1/vsp1_hsit.c4
-rw-r--r--drivers/media/platform/vsp1/vsp1_lif.c4
-rw-r--r--drivers/media/platform/vsp1/vsp1_lut.c6
-rw-r--r--drivers/media/platform/vsp1/vsp1_rpf.c2
-rw-r--r--drivers/media/platform/vsp1/vsp1_sru.c4
-rw-r--r--drivers/media/platform/vsp1/vsp1_uds.c4
-rw-r--r--drivers/media/platform/vsp1/vsp1_video.c4
-rw-r--r--drivers/media/platform/vsp1/vsp1_wpf.c4
9 files changed, 18 insertions, 18 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_bru.c b/drivers/media/platform/vsp1/vsp1_bru.c
index b1068c018011..ed36d3373943 100644
--- a/drivers/media/platform/vsp1/vsp1_bru.c
+++ b/drivers/media/platform/vsp1/vsp1_bru.c
@@ -249,7 +249,7 @@ static int bru_set_selection(struct v4l2_subdev *subdev,
249 return 0; 249 return 0;
250} 250}
251 251
252static struct v4l2_subdev_pad_ops bru_pad_ops = { 252static const struct v4l2_subdev_pad_ops bru_pad_ops = {
253 .init_cfg = vsp1_entity_init_cfg, 253 .init_cfg = vsp1_entity_init_cfg,
254 .enum_mbus_code = bru_enum_mbus_code, 254 .enum_mbus_code = bru_enum_mbus_code,
255 .enum_frame_size = bru_enum_frame_size, 255 .enum_frame_size = bru_enum_frame_size,
@@ -259,7 +259,7 @@ static struct v4l2_subdev_pad_ops bru_pad_ops = {
259 .set_selection = bru_set_selection, 259 .set_selection = bru_set_selection,
260}; 260};
261 261
262static struct v4l2_subdev_ops bru_ops = { 262static const struct v4l2_subdev_ops bru_ops = {
263 .pad = &bru_pad_ops, 263 .pad = &bru_pad_ops,
264}; 264};
265 265
diff --git a/drivers/media/platform/vsp1/vsp1_hsit.c b/drivers/media/platform/vsp1/vsp1_hsit.c
index 68b8567b374d..ec90af1bb209 100644
--- a/drivers/media/platform/vsp1/vsp1_hsit.c
+++ b/drivers/media/platform/vsp1/vsp1_hsit.c
@@ -107,7 +107,7 @@ static int hsit_set_format(struct v4l2_subdev *subdev,
107 return 0; 107 return 0;
108} 108}
109 109
110static struct v4l2_subdev_pad_ops hsit_pad_ops = { 110static const struct v4l2_subdev_pad_ops hsit_pad_ops = {
111 .init_cfg = vsp1_entity_init_cfg, 111 .init_cfg = vsp1_entity_init_cfg,
112 .enum_mbus_code = hsit_enum_mbus_code, 112 .enum_mbus_code = hsit_enum_mbus_code,
113 .enum_frame_size = hsit_enum_frame_size, 113 .enum_frame_size = hsit_enum_frame_size,
@@ -115,7 +115,7 @@ static struct v4l2_subdev_pad_ops hsit_pad_ops = {
115 .set_fmt = hsit_set_format, 115 .set_fmt = hsit_set_format,
116}; 116};
117 117
118static struct v4l2_subdev_ops hsit_ops = { 118static const struct v4l2_subdev_ops hsit_ops = {
119 .pad = &hsit_pad_ops, 119 .pad = &hsit_pad_ops,
120}; 120};
121 121
diff --git a/drivers/media/platform/vsp1/vsp1_lif.c b/drivers/media/platform/vsp1/vsp1_lif.c
index 0217393f22df..e554b3150748 100644
--- a/drivers/media/platform/vsp1/vsp1_lif.c
+++ b/drivers/media/platform/vsp1/vsp1_lif.c
@@ -104,7 +104,7 @@ static int lif_set_format(struct v4l2_subdev *subdev,
104 return 0; 104 return 0;
105} 105}
106 106
107static struct v4l2_subdev_pad_ops lif_pad_ops = { 107static const struct v4l2_subdev_pad_ops lif_pad_ops = {
108 .init_cfg = vsp1_entity_init_cfg, 108 .init_cfg = vsp1_entity_init_cfg,
109 .enum_mbus_code = lif_enum_mbus_code, 109 .enum_mbus_code = lif_enum_mbus_code,
110 .enum_frame_size = lif_enum_frame_size, 110 .enum_frame_size = lif_enum_frame_size,
@@ -112,7 +112,7 @@ static struct v4l2_subdev_pad_ops lif_pad_ops = {
112 .set_fmt = lif_set_format, 112 .set_fmt = lif_set_format,
113}; 113};
114 114
115static struct v4l2_subdev_ops lif_ops = { 115static const struct v4l2_subdev_ops lif_ops = {
116 .pad = &lif_pad_ops, 116 .pad = &lif_pad_ops,
117}; 117};
118 118
diff --git a/drivers/media/platform/vsp1/vsp1_lut.c b/drivers/media/platform/vsp1/vsp1_lut.c
index aa09e59f0ab8..a543debaafb5 100644
--- a/drivers/media/platform/vsp1/vsp1_lut.c
+++ b/drivers/media/platform/vsp1/vsp1_lut.c
@@ -147,11 +147,11 @@ static int lut_set_format(struct v4l2_subdev *subdev,
147 * V4L2 Subdevice Operations 147 * V4L2 Subdevice Operations
148 */ 148 */
149 149
150static struct v4l2_subdev_core_ops lut_core_ops = { 150static const struct v4l2_subdev_core_ops lut_core_ops = {
151 .ioctl = lut_ioctl, 151 .ioctl = lut_ioctl,
152}; 152};
153 153
154static struct v4l2_subdev_pad_ops lut_pad_ops = { 154static const struct v4l2_subdev_pad_ops lut_pad_ops = {
155 .init_cfg = vsp1_entity_init_cfg, 155 .init_cfg = vsp1_entity_init_cfg,
156 .enum_mbus_code = lut_enum_mbus_code, 156 .enum_mbus_code = lut_enum_mbus_code,
157 .enum_frame_size = lut_enum_frame_size, 157 .enum_frame_size = lut_enum_frame_size,
@@ -159,7 +159,7 @@ static struct v4l2_subdev_pad_ops lut_pad_ops = {
159 .set_fmt = lut_set_format, 159 .set_fmt = lut_set_format,
160}; 160};
161 161
162static struct v4l2_subdev_ops lut_ops = { 162static const struct v4l2_subdev_ops lut_ops = {
163 .core = &lut_core_ops, 163 .core = &lut_core_ops,
164 .pad = &lut_pad_ops, 164 .pad = &lut_pad_ops,
165}; 165};
diff --git a/drivers/media/platform/vsp1/vsp1_rpf.c b/drivers/media/platform/vsp1/vsp1_rpf.c
index 64dfbddf2aba..4b397baef88f 100644
--- a/drivers/media/platform/vsp1/vsp1_rpf.c
+++ b/drivers/media/platform/vsp1/vsp1_rpf.c
@@ -38,7 +38,7 @@ static inline void vsp1_rpf_write(struct vsp1_rwpf *rpf,
38 * V4L2 Subdevice Operations 38 * V4L2 Subdevice Operations
39 */ 39 */
40 40
41static struct v4l2_subdev_ops rpf_ops = { 41static const struct v4l2_subdev_ops rpf_ops = {
42 .pad = &vsp1_rwpf_pad_ops, 42 .pad = &vsp1_rwpf_pad_ops,
43}; 43};
44 44
diff --git a/drivers/media/platform/vsp1/vsp1_sru.c b/drivers/media/platform/vsp1/vsp1_sru.c
index 97ef997ae735..6f8cf98de867 100644
--- a/drivers/media/platform/vsp1/vsp1_sru.c
+++ b/drivers/media/platform/vsp1/vsp1_sru.c
@@ -239,7 +239,7 @@ static int sru_set_format(struct v4l2_subdev *subdev,
239 return 0; 239 return 0;
240} 240}
241 241
242static struct v4l2_subdev_pad_ops sru_pad_ops = { 242static const struct v4l2_subdev_pad_ops sru_pad_ops = {
243 .init_cfg = vsp1_entity_init_cfg, 243 .init_cfg = vsp1_entity_init_cfg,
244 .enum_mbus_code = sru_enum_mbus_code, 244 .enum_mbus_code = sru_enum_mbus_code,
245 .enum_frame_size = sru_enum_frame_size, 245 .enum_frame_size = sru_enum_frame_size,
@@ -247,7 +247,7 @@ static struct v4l2_subdev_pad_ops sru_pad_ops = {
247 .set_fmt = sru_set_format, 247 .set_fmt = sru_set_format,
248}; 248};
249 249
250static struct v4l2_subdev_ops sru_ops = { 250static const struct v4l2_subdev_ops sru_ops = {
251 .pad = &sru_pad_ops, 251 .pad = &sru_pad_ops,
252}; 252};
253 253
diff --git a/drivers/media/platform/vsp1/vsp1_uds.c b/drivers/media/platform/vsp1/vsp1_uds.c
index 1875e29da184..5d508e70fdda 100644
--- a/drivers/media/platform/vsp1/vsp1_uds.c
+++ b/drivers/media/platform/vsp1/vsp1_uds.c
@@ -226,7 +226,7 @@ static int uds_set_format(struct v4l2_subdev *subdev,
226 * V4L2 Subdevice Operations 226 * V4L2 Subdevice Operations
227 */ 227 */
228 228
229static struct v4l2_subdev_pad_ops uds_pad_ops = { 229static const struct v4l2_subdev_pad_ops uds_pad_ops = {
230 .init_cfg = vsp1_entity_init_cfg, 230 .init_cfg = vsp1_entity_init_cfg,
231 .enum_mbus_code = uds_enum_mbus_code, 231 .enum_mbus_code = uds_enum_mbus_code,
232 .enum_frame_size = uds_enum_frame_size, 232 .enum_frame_size = uds_enum_frame_size,
@@ -234,7 +234,7 @@ static struct v4l2_subdev_pad_ops uds_pad_ops = {
234 .set_fmt = uds_set_format, 234 .set_fmt = uds_set_format,
235}; 235};
236 236
237static struct v4l2_subdev_ops uds_ops = { 237static const struct v4l2_subdev_ops uds_ops = {
238 .pad = &uds_pad_ops, 238 .pad = &uds_pad_ops,
239}; 239};
240 240
diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c
index 34aa6427662d..a899b15c8d87 100644
--- a/drivers/media/platform/vsp1/vsp1_video.c
+++ b/drivers/media/platform/vsp1/vsp1_video.c
@@ -696,7 +696,7 @@ static void vsp1_video_stop_streaming(struct vb2_queue *vq)
696 spin_unlock_irqrestore(&video->irqlock, flags); 696 spin_unlock_irqrestore(&video->irqlock, flags);
697} 697}
698 698
699static struct vb2_ops vsp1_video_queue_qops = { 699static const struct vb2_ops vsp1_video_queue_qops = {
700 .queue_setup = vsp1_video_queue_setup, 700 .queue_setup = vsp1_video_queue_setup,
701 .buf_prepare = vsp1_video_buffer_prepare, 701 .buf_prepare = vsp1_video_buffer_prepare,
702 .buf_queue = vsp1_video_buffer_queue, 702 .buf_queue = vsp1_video_buffer_queue,
@@ -913,7 +913,7 @@ static int vsp1_video_release(struct file *file)
913 return 0; 913 return 0;
914} 914}
915 915
916static struct v4l2_file_operations vsp1_video_fops = { 916static const struct v4l2_file_operations vsp1_video_fops = {
917 .owner = THIS_MODULE, 917 .owner = THIS_MODULE,
918 .unlocked_ioctl = video_ioctl2, 918 .unlocked_ioctl = video_ioctl2,
919 .open = vsp1_video_open, 919 .open = vsp1_video_open,
diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c
index 6c91eaa35e75..59bdb450e6f1 100644
--- a/drivers/media/platform/vsp1/vsp1_wpf.c
+++ b/drivers/media/platform/vsp1/vsp1_wpf.c
@@ -62,11 +62,11 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable)
62 * V4L2 Subdevice Operations 62 * V4L2 Subdevice Operations
63 */ 63 */
64 64
65static struct v4l2_subdev_video_ops wpf_video_ops = { 65static const struct v4l2_subdev_video_ops wpf_video_ops = {
66 .s_stream = wpf_s_stream, 66 .s_stream = wpf_s_stream,
67}; 67};
68 68
69static struct v4l2_subdev_ops wpf_ops = { 69static const struct v4l2_subdev_ops wpf_ops = {
70 .video = &wpf_video_ops, 70 .video = &wpf_video_ops,
71 .pad = &vsp1_rwpf_pad_ops, 71 .pad = &vsp1_rwpf_pad_ops,
72}; 72};