]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
[media] s5p-mfc: constify s5p_mfc_codec_ops structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 22 Nov 2015 07:45:34 +0000 (05:45 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 23 Dec 2015 15:52:30 +0000 (13:52 -0200)
The s5p_mfc_codec_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: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/s5p-mfc/s5p_mfc_common.h
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
drivers/media/platform/s5p-mfc/s5p_mfc_dec.h
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
drivers/media/platform/s5p-mfc/s5p_mfc_enc.h

index d1a3f9b1bc4412dfb4a30d380d63e611717a974f..e90ad7e9670725935340157eb319a7995197b480 100644 (file)
@@ -653,7 +653,7 @@ struct s5p_mfc_ctx {
                unsigned int bits;
        } slice_size;
 
-       struct s5p_mfc_codec_ops *c_ops;
+       const struct s5p_mfc_codec_ops *c_ops;
 
        struct v4l2_ctrl *ctrls[MFC_MAX_CTRLS];
        struct v4l2_ctrl_handler ctrl_handler;
index dabf26399a9e0d90e96b65098e337b16ba5db967..7f6e4c0be31dccd53b06f8d786e2f48f03001208 100644 (file)
@@ -252,7 +252,7 @@ static int s5p_mfc_ctx_ready(struct s5p_mfc_ctx *ctx)
        return 0;
 }
 
-static struct s5p_mfc_codec_ops decoder_codec_ops = {
+static const struct s5p_mfc_codec_ops decoder_codec_ops = {
        .pre_seq_start          = NULL,
        .post_seq_start         = NULL,
        .pre_frame_start        = NULL,
@@ -1104,7 +1104,7 @@ static struct vb2_ops s5p_mfc_dec_qops = {
        .buf_queue              = s5p_mfc_buf_queue,
 };
 
-struct s5p_mfc_codec_ops *get_dec_codec_ops(void)
+const struct s5p_mfc_codec_ops *get_dec_codec_ops(void)
 {
        return &decoder_codec_ops;
 }
index d06a7cab5eb1bc32f86cb7edfbac1062fd141b14..886628b153f002dadfe89e6adcb4d501794e4f27 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef S5P_MFC_DEC_H_
 #define S5P_MFC_DEC_H_
 
-struct s5p_mfc_codec_ops *get_dec_codec_ops(void);
+const struct s5p_mfc_codec_ops *get_dec_codec_ops(void);
 struct vb2_ops *get_dec_queue_ops(void);
 const struct v4l2_ioctl_ops *get_dec_v4l2_ioctl_ops(void);
 struct s5p_mfc_fmt *get_dec_def_fmt(bool src);
index 9916cded4a724e055efd8b69602a6df9bcbfeba8..a9863998d412e5c3268db05003409e677264c8d4 100644 (file)
@@ -936,7 +936,7 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)
        return 0;
 }
 
-static struct s5p_mfc_codec_ops encoder_codec_ops = {
+static const struct s5p_mfc_codec_ops encoder_codec_ops = {
        .pre_seq_start          = enc_pre_seq_start,
        .post_seq_start         = enc_post_seq_start,
        .pre_frame_start        = enc_pre_frame_start,
@@ -2051,7 +2051,7 @@ static struct vb2_ops s5p_mfc_enc_qops = {
        .buf_queue              = s5p_mfc_buf_queue,
 };
 
-struct s5p_mfc_codec_ops *get_enc_codec_ops(void)
+const struct s5p_mfc_codec_ops *get_enc_codec_ops(void)
 {
        return &encoder_codec_ops;
 }
index 5118d46b3a9ea767acd6290a6b5a3d550aabc905..d0d42f81883219e864123b6cdc96522664708460 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef S5P_MFC_ENC_H_
 #define S5P_MFC_ENC_H_
 
-struct s5p_mfc_codec_ops *get_enc_codec_ops(void);
+const struct s5p_mfc_codec_ops *get_enc_codec_ops(void);
 struct vb2_ops *get_enc_queue_ops(void);
 const struct v4l2_ioctl_ops *get_enc_v4l2_ioctl_ops(void);
 struct s5p_mfc_fmt *get_enc_def_fmt(bool src);