[media] cx231xx: constify cx2341x_handler_ops structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 22 Nov 2015 17:44:38 +0000 (15:44 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 3 Dec 2015 13:27:08 +0000 (11:27 -0200)
The cx2341x_handler_ops structures are never modified, 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/pci/cx18/cx18-controls.c
drivers/media/pci/cx18/cx18-controls.h
drivers/media/pci/ivtv/ivtv-controls.c
drivers/media/pci/ivtv/ivtv-controls.h
drivers/media/usb/cx231xx/cx231xx-417.c

index 71227a155cba5c03830635fef8368997c4e0cb97..adb5a8c72c06d888052cd98e65947175d6860106 100644 (file)
@@ -126,7 +126,7 @@ static int cx18_s_audio_mode(struct cx2341x_handler *cxhdl, u32 val)
        return 0;
 }
 
-struct cx2341x_handler_ops cx18_cxhdl_ops = {
+const struct cx2341x_handler_ops cx18_cxhdl_ops = {
        .s_audio_mode = cx18_s_audio_mode,
        .s_audio_sampling_freq = cx18_s_audio_sampling_freq,
        .s_video_encoding = cx18_s_video_encoding,
index cb5dfc7b20546969a1cdd06f23467cba229901a7..326794887863225fcc93d4231eef1dbe385261a2 100644 (file)
@@ -21,4 +21,4 @@
  *  02111-1307  USA
  */
 
-extern struct cx2341x_handler_ops cx18_cxhdl_ops;
+extern const struct cx2341x_handler_ops cx18_cxhdl_ops;
index 8a55ccb8f0c97e2595b3b253736628d6e50f4001..9666ca01549c4d25ded2bd4fd4acd9dec7d480ca 100644 (file)
@@ -96,7 +96,7 @@ static int ivtv_s_audio_mode(struct cx2341x_handler *cxhdl, u32 val)
        return 0;
 }
 
-struct cx2341x_handler_ops ivtv_cxhdl_ops = {
+const struct cx2341x_handler_ops ivtv_cxhdl_ops = {
        .s_audio_mode = ivtv_s_audio_mode,
        .s_audio_sampling_freq = ivtv_s_audio_sampling_freq,
        .s_video_encoding = ivtv_s_video_encoding,
index 3999e63583120b133ea779ac149e05749c4132b1..ea397ba837e3d7cd730318a0e81c24522dce88c8 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef IVTV_CONTROLS_H
 #define IVTV_CONTROLS_H
 
-extern struct cx2341x_handler_ops ivtv_cxhdl_ops;
+extern const struct cx2341x_handler_ops ivtv_cxhdl_ops;
 extern const struct v4l2_ctrl_ops ivtv_hdl_out_ops;
 int ivtv_g_pts_frame(struct ivtv *itv, s64 *pts, s64 *frame);
 
index f59a6f18f458d794cd53f9ebab534efde4159e8c..66b1b00b1b5bde4a3ca9805df6ab771c730815ad 100644 (file)
@@ -1901,7 +1901,7 @@ static int cx231xx_s_audio_sampling_freq(struct cx2341x_handler *cxhdl, u32 idx)
        return 0;
 }
 
-static struct cx2341x_handler_ops cx231xx_ops = {
+static const struct cx2341x_handler_ops cx231xx_ops = {
        /* needed for the video clock freq */
        .s_audio_sampling_freq = cx231xx_s_audio_sampling_freq,
        /* needed for setting up the video resolution */
This page took 0.028415 seconds and 5 git commands to generate.