[media] i2c: constify v4l2_ctrl_ops structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Fri, 13 Nov 2015 22:05:17 +0000 (20:05 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 17 Nov 2015 17:41:33 +0000 (15:41 -0200)
These v4l2_ctrl_ops structures are never modified, like all the other
v4l2_ctrl_ops structures, so declare them as const.

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@osg.samsung.com>
drivers/media/i2c/mt9m032.c
drivers/media/i2c/mt9p031.c
drivers/media/i2c/mt9t001.c
drivers/media/i2c/mt9v011.c
drivers/media/i2c/mt9v032.c
drivers/media/i2c/ov2659.c

index 3612228eceaa81e50e50f401f824d3fa48608a20..101cb26f9330e73e0e69fd16e782bb9d3b407e6d 100644 (file)
@@ -671,7 +671,7 @@ static int mt9m032_set_ctrl(struct v4l2_ctrl *ctrl)
        return 0;
 }
 
-static struct v4l2_ctrl_ops mt9m032_ctrl_ops = {
+static const struct v4l2_ctrl_ops mt9m032_ctrl_ops = {
        .s_ctrl = mt9m032_set_ctrl,
        .try_ctrl = mt9m032_try_ctrl,
 };
index b3278f9bdcfb6d020fb69a53e54eabe341c460b7..a3da0e977d0b3590442d9be8dcd2384a4783c475 100644 (file)
@@ -817,7 +817,7 @@ static int mt9p031_s_ctrl(struct v4l2_ctrl *ctrl)
        return 0;
 }
 
-static struct v4l2_ctrl_ops mt9p031_ctrl_ops = {
+static const struct v4l2_ctrl_ops mt9p031_ctrl_ops = {
        .s_ctrl = mt9p031_s_ctrl,
 };
 
index 0596ff6c05913a0b94a01e7f1feca8ccfb676d5f..b28fdff1d3107d399ef6e0dce1e77875bead0183 100644 (file)
@@ -626,7 +626,7 @@ static int mt9t001_s_ctrl(struct v4l2_ctrl *ctrl)
        return 0;
 }
 
-static struct v4l2_ctrl_ops mt9t001_ctrl_ops = {
+static const struct v4l2_ctrl_ops mt9t001_ctrl_ops = {
        .s_ctrl = mt9t001_s_ctrl,
 };
 
index 6ef44b8b00286c5482193e9c405d0cbed2968448..b9fea11d6b0b0e08ff2c4440f976a97a077aaa99 100644 (file)
@@ -454,7 +454,7 @@ static int mt9v011_s_ctrl(struct v4l2_ctrl *ctrl)
        return 0;
 }
 
-static struct v4l2_ctrl_ops mt9v011_ctrl_ops = {
+static const struct v4l2_ctrl_ops mt9v011_ctrl_ops = {
        .s_ctrl = mt9v011_s_ctrl,
 };
 
index 553ccdd5ff16ad1f654e931115601b35c3fa78fa..1dbbd23fdfb039f2b26b4fc9c20fee6a39e5c265 100644 (file)
@@ -703,7 +703,7 @@ static int mt9v032_s_ctrl(struct v4l2_ctrl *ctrl)
        return 0;
 }
 
-static struct v4l2_ctrl_ops mt9v032_ctrl_ops = {
+static const struct v4l2_ctrl_ops mt9v032_ctrl_ops = {
        .s_ctrl = mt9v032_s_ctrl,
 };
 
index dc662769a81068aa6827d07b8c994f70f34f5b4b..82c7ac1cc88e89d022c4850ae9e2c008cb880e8b 100644 (file)
@@ -1249,7 +1249,7 @@ static int ov2659_s_ctrl(struct v4l2_ctrl *ctrl)
        return 0;
 }
 
-static struct v4l2_ctrl_ops ov2659_ctrl_ops = {
+static const struct v4l2_ctrl_ops ov2659_ctrl_ops = {
        .s_ctrl = ov2659_s_ctrl,
 };