linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel@collabora.com>
To: linux-media@vger.kernel.org
Cc: Hans Verkuil <hans.verkuil@cisco.com>,
	kernel@collabora.com, Ezequiel Garcia <ezequiel@collabora.com>
Subject: [PATCH 08/10] sh_veu: Correct return type for mem2mem buffer helpers
Date: Fri,  8 Feb 2019 13:17:46 -0300	[thread overview]
Message-ID: <20190208161748.5862-9-ezequiel@collabora.com> (raw)
In-Reply-To: <20190208161748.5862-1-ezequiel@collabora.com>

Fix the assigned type of mem2mem buffer handling API.
Namely, these functions:

 v4l2_m2m_next_buf
 v4l2_m2m_last_buf
 v4l2_m2m_buf_remove
 v4l2_m2m_next_src_buf
 v4l2_m2m_next_dst_buf
 v4l2_m2m_last_src_buf
 v4l2_m2m_last_dst_buf
 v4l2_m2m_src_buf_remove
 v4l2_m2m_dst_buf_remove

return a struct vb2_v4l2_buffer, and not a struct vb2_buffer.

Fixing this is necessary to fix the mem2mem buffer handling API,
changing the return to the correct struct vb2_v4l2_buffer instead
of a void pointer.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
---
 drivers/media/platform/sh_veu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/sh_veu.c b/drivers/media/platform/sh_veu.c
index 09ae64a0004c..d277cc674349 100644
--- a/drivers/media/platform/sh_veu.c
+++ b/drivers/media/platform/sh_veu.c
@@ -273,13 +273,13 @@ static void sh_veu_process(struct sh_veu_dev *veu,
 static void sh_veu_device_run(void *priv)
 {
 	struct sh_veu_dev *veu = priv;
-	struct vb2_buffer *src_buf, *dst_buf;
+	struct vb2_v4l2_buffer *src_buf, *dst_buf;
 
 	src_buf = v4l2_m2m_next_src_buf(veu->m2m_ctx);
 	dst_buf = v4l2_m2m_next_dst_buf(veu->m2m_ctx);
 
 	if (src_buf && dst_buf)
-		sh_veu_process(veu, src_buf, dst_buf);
+		sh_veu_process(veu, &src_buf->vb2_buf, &dst_buf->vb2_buf);
 }
 
 		/* ========== video ioctls ========== */
-- 
2.20.1


  parent reply	other threads:[~2019-02-08 16:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08 16:17 [PATCH 00/10] Correct return type for mem2mem buffer helpers Ezequiel Garcia
2019-02-08 16:17 ` [PATCH 01/10] mtk-jpeg: " Ezequiel Garcia
2019-02-08 16:17 ` [PATCH 02/10] mtk-mdp: " Ezequiel Garcia
2019-02-08 16:17 ` [PATCH 03/10] mtk-vcodec: " Ezequiel Garcia
2019-02-08 16:17 ` [PATCH 04/10] mx2_emmaprp: " Ezequiel Garcia
2019-02-08 16:17 ` [PATCH 05/10] rockchip/rga: " Ezequiel Garcia
2019-02-08 16:17 ` [PATCH 06/10] s5p-g2d: " Ezequiel Garcia
2019-02-08 16:17 ` [PATCH 07/10] s5p-jpeg: " Ezequiel Garcia
2019-02-08 16:17 ` Ezequiel Garcia [this message]
2019-02-08 16:17 ` [PATCH 09/10] rockchip/vpu: " Ezequiel Garcia
2019-02-08 16:17 ` [PATCH 10/10] media: v4l2-mem2mem: " Ezequiel Garcia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190208161748.5862-9-ezequiel@collabora.com \
    --to=ezequiel@collabora.com \
    --cc=hans.verkuil@cisco.com \
    --cc=kernel@collabora.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).