]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.111/media-sh_veu-correct-return-type-for-mem2mem-buffer-.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.14.111 / media-sh_veu-correct-return-type-for-mem2mem-buffer-.patch
CommitLineData
04fd09d4
SL
1From ce68f5ef5deb02469b18b518d0e7d9c14c49fe07 Mon Sep 17 00:00:00 2001
2From: Ezequiel Garcia <ezequiel@collabora.com>
3Date: Fri, 8 Feb 2019 11:17:46 -0500
4Subject: media: sh_veu: Correct return type for mem2mem buffer helpers
5
6[ Upstream commit 43c145195c7fc3025ee7ecfc67112ac1c82af7c2 ]
7
8Fix the assigned type of mem2mem buffer handling API.
9Namely, these functions:
10
11 v4l2_m2m_next_buf
12 v4l2_m2m_last_buf
13 v4l2_m2m_buf_remove
14 v4l2_m2m_next_src_buf
15 v4l2_m2m_next_dst_buf
16 v4l2_m2m_last_src_buf
17 v4l2_m2m_last_dst_buf
18 v4l2_m2m_src_buf_remove
19 v4l2_m2m_dst_buf_remove
20
21return a struct vb2_v4l2_buffer, and not a struct vb2_buffer.
22
23Fixing this is necessary to fix the mem2mem buffer handling API,
24changing the return to the correct struct vb2_v4l2_buffer instead
25of a void pointer.
26
27Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
28Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
29Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
30Signed-off-by: Sasha Levin <sashal@kernel.org>
31---
32 drivers/media/platform/sh_veu.c | 4 ++--
33 1 file changed, 2 insertions(+), 2 deletions(-)
34
35diff --git a/drivers/media/platform/sh_veu.c b/drivers/media/platform/sh_veu.c
36index 15a562af13c7..a4f593220ef0 100644
37--- a/drivers/media/platform/sh_veu.c
38+++ b/drivers/media/platform/sh_veu.c
39@@ -276,13 +276,13 @@ static void sh_veu_process(struct sh_veu_dev *veu,
40 static void sh_veu_device_run(void *priv)
41 {
42 struct sh_veu_dev *veu = priv;
43- struct vb2_buffer *src_buf, *dst_buf;
44+ struct vb2_v4l2_buffer *src_buf, *dst_buf;
45
46 src_buf = v4l2_m2m_next_src_buf(veu->m2m_ctx);
47 dst_buf = v4l2_m2m_next_dst_buf(veu->m2m_ctx);
48
49 if (src_buf && dst_buf)
50- sh_veu_process(veu, src_buf, dst_buf);
51+ sh_veu_process(veu, &src_buf->vb2_buf, &dst_buf->vb2_buf);
52 }
53
54 /* ========== video ioctls ========== */
55--
562.19.1
57