media: vimc: constify video_subdev structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Tue, 8 Aug 2017 10:58:28 +0000 (06:58 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 20 Aug 2017 12:04:30 +0000 (08:04 -0400)
These structures are all only stored in fields of v4l2_subdev_ops
structures, all of which are const, so these structures can be const
as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/vimc/vimc-debayer.c
drivers/media/platform/vimc/vimc-scaler.c
drivers/media/platform/vimc/vimc-sensor.c

index 033a131f67aff124a15fc395a25fcf20d182b3a6..4d663e89d33f1f0e7b0b2a3252dee7e8fc03ed37 100644 (file)
@@ -373,7 +373,7 @@ static int vimc_deb_s_stream(struct v4l2_subdev *sd, int enable)
        return 0;
 }
 
-static struct v4l2_subdev_video_ops vimc_deb_video_ops = {
+static const struct v4l2_subdev_video_ops vimc_deb_video_ops = {
        .s_stream = vimc_deb_s_stream,
 };
 
index 0a3e086e12f32e0474a30c7add7ecc53de76c818..e1602e0bc230157817d8762926b96682bcca923d 100644 (file)
@@ -267,7 +267,7 @@ static int vimc_sca_s_stream(struct v4l2_subdev *sd, int enable)
        return 0;
 }
 
-static struct v4l2_subdev_video_ops vimc_sca_video_ops = {
+static const struct v4l2_subdev_video_ops vimc_sca_video_ops = {
        .s_stream = vimc_sca_s_stream,
 };
 
index 615c2b18dcfc87ebd14717001c3af31b7a4c5485..02e68c8fc02bffa0e4cd5047f08392c311d6528d 100644 (file)
@@ -282,7 +282,7 @@ static int vimc_sen_s_stream(struct v4l2_subdev *sd, int enable)
        return 0;
 }
 
-static struct v4l2_subdev_video_ops vimc_sen_video_ops = {
+static const struct v4l2_subdev_video_ops vimc_sen_video_ops = {
        .s_stream = vimc_sen_s_stream,
 };