From 9fcb242be63db7c43c65401b615012225c648515 Mon Sep 17 00:00:00 2001 From: Alexandre Courbot Date: Fri, 14 Jun 2019 03:56:40 -0400 Subject: media: mtk-vcodec: remove unneeded proxy functions We were getting the codec interface through a proxy function that does not bring anything compared to just accessing the interface definition directly, so just do that. Also make the decoder interfaces const. Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/mtk-vcodec/vdec_drv_if.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'drivers/media/platform/mtk-vcodec/vdec_drv_if.c') diff --git a/drivers/media/platform/mtk-vcodec/vdec_drv_if.c b/drivers/media/platform/mtk-vcodec/vdec_drv_if.c index 8354404a7fc9..2e43dd4486e0 100644 --- a/drivers/media/platform/mtk-vcodec/vdec_drv_if.c +++ b/drivers/media/platform/mtk-vcodec/vdec_drv_if.c @@ -15,23 +15,19 @@ #include "mtk_vcodec_dec_pm.h" #include "mtk_vpu.h" -const struct vdec_common_if *get_h264_dec_comm_if(void); -const struct vdec_common_if *get_vp8_dec_comm_if(void); -const struct vdec_common_if *get_vp9_dec_comm_if(void); - int vdec_if_init(struct mtk_vcodec_ctx *ctx, unsigned int fourcc) { int ret = 0; switch (fourcc) { case V4L2_PIX_FMT_H264: - ctx->dec_if = get_h264_dec_comm_if(); + ctx->dec_if = &vdec_h264_if; break; case V4L2_PIX_FMT_VP8: - ctx->dec_if = get_vp8_dec_comm_if(); + ctx->dec_if = &vdec_vp8_if; break; case V4L2_PIX_FMT_VP9: - ctx->dec_if = get_vp9_dec_comm_if(); + ctx->dec_if = &vdec_vp9_if; break; default: return -EINVAL; -- cgit v1.2.3