]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: staging: media: atomisp: constify video_subdev structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Tue, 8 Aug 2017 10:58:29 +0000 (06:58 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 9 Aug 2017 14:53:47 +0000 (10:53 -0400)
These structures are both 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: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/atomisp/i2c/ap1302.c
drivers/staging/media/atomisp/i2c/mt9m114.c

index bacffbe962d4981af9960a782519c6665fb04fe4..de687c6fae577031e91ace0644c9d0dd1c4ee3fa 100644 (file)
@@ -1098,7 +1098,7 @@ static const struct v4l2_ctrl_config ctrls[] = {
        },
 };
 
-static struct v4l2_subdev_sensor_ops ap1302_sensor_ops = {
+static const struct v4l2_subdev_sensor_ops ap1302_sensor_ops = {
        .g_skip_frames  = ap1302_g_skip_frames,
 };
 
index 448e072ca0379409577070edce2b26e58139fe23..36a0636a532f9ca11541fdd2bae6865ec663fe8b 100644 (file)
@@ -1806,7 +1806,7 @@ static const struct v4l2_subdev_video_ops mt9m114_video_ops = {
        .g_frame_interval = mt9m114_g_frame_interval,
 };
 
-static struct v4l2_subdev_sensor_ops mt9m114_sensor_ops = {
+static const struct v4l2_subdev_sensor_ops mt9m114_sensor_ops = {
        .g_skip_frames  = mt9m114_g_skip_frames,
 };