summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/mt9m111.c
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2017-08-08 06:58:30 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-08-20 08:32:31 -0400
commit392296208b952dfa486cfa44db72587efd960714 (patch)
tree617556b30758fdc840d6f81632980bfd04afbd78 /drivers/media/i2c/mt9m111.c
parenta828d818bf6f48e1f594a19df0594af9065dc5dc (diff)
downloadtalos-obmc-linux-392296208b952dfa486cfa44db72587efd960714.tar.gz
talos-obmc-linux-392296208b952dfa486cfa44db72587efd960714.zip
media: mt9m111: constify video_subdev structures
The v4l2_subdev_ops structure is only passed as the third argument of v4l2_i2c_subdev_init, which is const, so the v4l2_subdev_ops structure can be const as well. The other structures are only stored in the v4l2_subdev_ops structure, all the fields of which are const, so these structures can also be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c/mt9m111.c')
-rw-r--r--drivers/media/i2c/mt9m111.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c
index 72e71b762827..99b992e46702 100644
--- a/drivers/media/i2c/mt9m111.c
+++ b/drivers/media/i2c/mt9m111.c
@@ -835,7 +835,7 @@ static const struct v4l2_ctrl_ops mt9m111_ctrl_ops = {
.s_ctrl = mt9m111_s_ctrl,
};
-static struct v4l2_subdev_core_ops mt9m111_subdev_core_ops = {
+static const struct v4l2_subdev_core_ops mt9m111_subdev_core_ops = {
.s_power = mt9m111_s_power,
#ifdef CONFIG_VIDEO_ADV_DEBUG
.g_register = mt9m111_g_register,
@@ -865,7 +865,7 @@ static int mt9m111_g_mbus_config(struct v4l2_subdev *sd,
return 0;
}
-static struct v4l2_subdev_video_ops mt9m111_subdev_video_ops = {
+static const struct v4l2_subdev_video_ops mt9m111_subdev_video_ops = {
.g_mbus_config = mt9m111_g_mbus_config,
};
@@ -877,7 +877,7 @@ static const struct v4l2_subdev_pad_ops mt9m111_subdev_pad_ops = {
.set_fmt = mt9m111_set_fmt,
};
-static struct v4l2_subdev_ops mt9m111_subdev_ops = {
+static const struct v4l2_subdev_ops mt9m111_subdev_ops = {
.core = &mt9m111_subdev_core_ops,
.video = &mt9m111_subdev_video_ops,
.pad = &mt9m111_subdev_pad_ops,
OpenPOWER on IntegriCloud