[media] mtk-vcodec: constify venc_common_if structures

The venc_common_if 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@s-opensource.com>
This commit is contained in:
Julia Lawall 2016-08-09 13:03:55 -03:00 committed by Mauro Carvalho Chehab
parent 95ad747e92
commit 4319233d79
4 changed files with 9 additions and 9 deletions

View file

@ -240,7 +240,7 @@ struct mtk_vcodec_ctx {
enum mtk_encode_param param_change; enum mtk_encode_param param_change;
struct mtk_enc_params enc_params; struct mtk_enc_params enc_params;
struct venc_common_if *enc_if; const struct venc_common_if *enc_if;
unsigned long drv_handle; unsigned long drv_handle;
int int_cond; int int_cond;

View file

@ -664,16 +664,16 @@ static int h264_enc_deinit(unsigned long handle)
return ret; return ret;
} }
static struct venc_common_if venc_h264_if = { static const struct venc_common_if venc_h264_if = {
h264_enc_init, h264_enc_init,
h264_enc_encode, h264_enc_encode,
h264_enc_set_param, h264_enc_set_param,
h264_enc_deinit, h264_enc_deinit,
}; };
struct venc_common_if *get_h264_enc_comm_if(void); const struct venc_common_if *get_h264_enc_comm_if(void);
struct venc_common_if *get_h264_enc_comm_if(void) const struct venc_common_if *get_h264_enc_comm_if(void)
{ {
return &venc_h264_if; return &venc_h264_if;
} }

View file

@ -471,16 +471,16 @@ static int vp8_enc_deinit(unsigned long handle)
return ret; return ret;
} }
static struct venc_common_if venc_vp8_if = { static const struct venc_common_if venc_vp8_if = {
vp8_enc_init, vp8_enc_init,
vp8_enc_encode, vp8_enc_encode,
vp8_enc_set_param, vp8_enc_set_param,
vp8_enc_deinit, vp8_enc_deinit,
}; };
struct venc_common_if *get_vp8_enc_comm_if(void); const struct venc_common_if *get_vp8_enc_comm_if(void);
struct venc_common_if *get_vp8_enc_comm_if(void) const struct venc_common_if *get_vp8_enc_comm_if(void)
{ {
return &venc_vp8_if; return &venc_vp8_if;
} }

View file

@ -26,8 +26,8 @@
#include "mtk_vcodec_enc_pm.h" #include "mtk_vcodec_enc_pm.h"
#include "mtk_vpu.h" #include "mtk_vpu.h"
struct venc_common_if *get_h264_enc_comm_if(void); const struct venc_common_if *get_h264_enc_comm_if(void);
struct venc_common_if *get_vp8_enc_comm_if(void); const struct venc_common_if *get_vp8_enc_comm_if(void);
int venc_if_init(struct mtk_vcodec_ctx *ctx, unsigned int fourcc) int venc_if_init(struct mtk_vcodec_ctx *ctx, unsigned int fourcc)
{ {