summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/hantro/rk3288_vpu_hw.c
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel@collabora.com>2020-07-01 15:16:05 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-07-19 13:25:22 +0200
commite765dba11ec26d7ea42974ec4d470b5ce00be3de (patch)
tree2a1329c8dff5f4a0a5b1791d9fbd1ca0bcfea9ad /drivers/staging/media/hantro/rk3288_vpu_hw.c
parent21f0315b7b3ee6ca909d81a963744671fb27bf71 (diff)
downloadlinux-e765dba11ec26d7ea42974ec4d470b5ce00be3de.tar.bz2
hantro: Move hantro_enc_buf_finish to JPEG codec_ops.done
hantro_enc_buf_finish is used only for JPEG, and so should be moved to JPEG codec_ops.done. This cleanup is also taking care of addressing a subtle issue: checking the non-NULL bounce buffer using ctx->jpeg_enc, which is a member of a union is confusing and error-prone. Note that the issue is currently innocuous because an encoder context only supports JPEG. The codec_ops.done has an argument that codec-specific code shouldn't need, so drop that as well. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging/media/hantro/rk3288_vpu_hw.c')
-rw-r--r--drivers/staging/media/hantro/rk3288_vpu_hw.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/media/hantro/rk3288_vpu_hw.c b/drivers/staging/media/hantro/rk3288_vpu_hw.c
index 2f914b37b9e5..b1cf2abb972f 100644
--- a/drivers/staging/media/hantro/rk3288_vpu_hw.c
+++ b/drivers/staging/media/hantro/rk3288_vpu_hw.c
@@ -180,6 +180,7 @@ static const struct hantro_codec_ops rk3288_vpu_codec_ops[] = {
.run = hantro_h1_jpeg_enc_run,
.reset = rk3288_vpu_enc_reset,
.init = hantro_jpeg_enc_init,
+ .done = hantro_jpeg_enc_done,
.exit = hantro_jpeg_enc_exit,
},
[HANTRO_MODE_H264_DEC] = {