[media] v4l: vsp1: Constify operation structures
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sat, 18 Jun 2016 00:11:26 +0000 (21:11 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 28 Jun 2016 15:03:30 +0000 (12:03 -0300)
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>
drivers/media/platform/vsp1/vsp1_bru.c
drivers/media/platform/vsp1/vsp1_hsit.c
drivers/media/platform/vsp1/vsp1_lif.c
drivers/media/platform/vsp1/vsp1_lut.c
drivers/media/platform/vsp1/vsp1_rpf.c
drivers/media/platform/vsp1/vsp1_sru.c
drivers/media/platform/vsp1/vsp1_uds.c
drivers/media/platform/vsp1/vsp1_video.c
drivers/media/platform/vsp1/vsp1_wpf.c

index b1068c018011de7c34bcb6eb11ff4710815646da..ed36d3373943b56225e10364796e946b07046488 100644 (file)
@@ -249,7 +249,7 @@ static int bru_set_selection(struct v4l2_subdev *subdev,
        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,
        .enum_mbus_code = bru_enum_mbus_code,
        .enum_frame_size = bru_enum_frame_size,
@@ -259,7 +259,7 @@ static struct v4l2_subdev_pad_ops bru_pad_ops = {
        .set_selection = bru_set_selection,
 };
 
-static struct v4l2_subdev_ops bru_ops = {
+static const struct v4l2_subdev_ops bru_ops = {
        .pad    = &bru_pad_ops,
 };
 
index 68b8567b374d8aed0f66b26b8d3ff7499fc461e4..ec90af1bb209a260a892a6ecf0d73bd1bf726153 100644 (file)
@@ -107,7 +107,7 @@ static int hsit_set_format(struct v4l2_subdev *subdev,
        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,
        .enum_mbus_code = hsit_enum_mbus_code,
        .enum_frame_size = hsit_enum_frame_size,
@@ -115,7 +115,7 @@ static struct v4l2_subdev_pad_ops hsit_pad_ops = {
        .set_fmt = hsit_set_format,
 };
 
-static struct v4l2_subdev_ops hsit_ops = {
+static const struct v4l2_subdev_ops hsit_ops = {
        .pad    = &hsit_pad_ops,
 };
 
index 0217393f22dfc395539dc4b0caa58f8bed604606..e554b3150748613550bf9b1f5c2862fa81322df3 100644 (file)
@@ -104,7 +104,7 @@ static int lif_set_format(struct v4l2_subdev *subdev,
        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,
        .enum_mbus_code = lif_enum_mbus_code,
        .enum_frame_size = lif_enum_frame_size,
@@ -112,7 +112,7 @@ static struct v4l2_subdev_pad_ops lif_pad_ops = {
        .set_fmt = lif_set_format,
 };
 
-static struct v4l2_subdev_ops lif_ops = {
+static const struct v4l2_subdev_ops lif_ops = {
        .pad    = &lif_pad_ops,
 };
 
index aa09e59f0ab8641ecfc04b04ee2a83db7c4746ff..a543debaafb5847fea85a41e82683539d8404df6 100644 (file)
@@ -147,11 +147,11 @@ static int lut_set_format(struct v4l2_subdev *subdev,
  * 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,
 };
 
-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,
        .enum_mbus_code = lut_enum_mbus_code,
        .enum_frame_size = lut_enum_frame_size,
@@ -159,7 +159,7 @@ static struct v4l2_subdev_pad_ops lut_pad_ops = {
        .set_fmt = lut_set_format,
 };
 
-static struct v4l2_subdev_ops lut_ops = {
+static const struct v4l2_subdev_ops lut_ops = {
        .core   = &lut_core_ops,
        .pad    = &lut_pad_ops,
 };
index 64dfbddf2abac96135c1e43385df9c752db821b4..4b397baef88f867232bf03d1641440a08726c268 100644 (file)
@@ -38,7 +38,7 @@ static inline void vsp1_rpf_write(struct vsp1_rwpf *rpf,
  * V4L2 Subdevice Operations
  */
 
-static struct v4l2_subdev_ops rpf_ops = {
+static const struct v4l2_subdev_ops rpf_ops = {
        .pad    = &vsp1_rwpf_pad_ops,
 };
 
index 97ef997ae735d83afc18c35b0d13939cdd698164..6f8cf98de8674b9d4c9627baee60753f509a2369 100644 (file)
@@ -239,7 +239,7 @@ static int sru_set_format(struct v4l2_subdev *subdev,
        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,
        .enum_mbus_code = sru_enum_mbus_code,
        .enum_frame_size = sru_enum_frame_size,
@@ -247,7 +247,7 @@ static struct v4l2_subdev_pad_ops sru_pad_ops = {
        .set_fmt = sru_set_format,
 };
 
-static struct v4l2_subdev_ops sru_ops = {
+static const struct v4l2_subdev_ops sru_ops = {
        .pad    = &sru_pad_ops,
 };
 
index 1875e29da184affe382a7e62b1f0229b10d41c0c..5d508e70fddaba51b745924697c4595b1b5d6ea8 100644 (file)
@@ -226,7 +226,7 @@ static int uds_set_format(struct v4l2_subdev *subdev,
  * 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,
        .enum_mbus_code = uds_enum_mbus_code,
        .enum_frame_size = uds_enum_frame_size,
@@ -234,7 +234,7 @@ static struct v4l2_subdev_pad_ops uds_pad_ops = {
        .set_fmt = uds_set_format,
 };
 
-static struct v4l2_subdev_ops uds_ops = {
+static const struct v4l2_subdev_ops uds_ops = {
        .pad    = &uds_pad_ops,
 };
 
index 34aa6427662d231642a8b85fcd08d1965a7faad6..a899b15c8d87262b432b00c287d9be4fb9bf8724 100644 (file)
@@ -696,7 +696,7 @@ static void vsp1_video_stop_streaming(struct vb2_queue *vq)
        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,
        .buf_prepare = vsp1_video_buffer_prepare,
        .buf_queue = vsp1_video_buffer_queue,
@@ -913,7 +913,7 @@ static int vsp1_video_release(struct file *file)
        return 0;
 }
 
-static struct v4l2_file_operations vsp1_video_fops = {
+static const struct v4l2_file_operations vsp1_video_fops = {
        .owner = THIS_MODULE,
        .unlocked_ioctl = video_ioctl2,
        .open = vsp1_video_open,
index 6c91eaa35e75c68ed11437795d4ba0565aace8df..59bdb450e6f17262a6de9a47a1b32ec53d011069 100644 (file)
@@ -62,11 +62,11 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable)
  * 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,
 };
 
-static struct v4l2_subdev_ops wpf_ops = {
+static const struct v4l2_subdev_ops wpf_ops = {
        .video  = &wpf_video_ops,
        .pad    = &vsp1_rwpf_pad_ops,
 };