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 033a131..4d663e8 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 0a3e086..e1602e0 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 615c2b1..02e68c8 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,
 };