diff options
author | Ezequiel Garcia <ezequiel@collabora.com> | 2019-06-10 16:55:25 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-06-21 16:25:39 -0400 |
commit | ababd7612321bbe89abc87c607ca8d70702d9e56 (patch) | |
tree | 0175ff35193ac28e56cb55c9290e4a5837d16e0b | |
parent | 9e393300167be4d0c6a6d17330de1fba9a675212 (diff) | |
download | talos-op-linux-ababd7612321bbe89abc87c607ca8d70702d9e56.tar.gz talos-op-linux-ababd7612321bbe89abc87c607ca8d70702d9e56.zip |
media: sti: Use vb2_get_buffer
Use the newly introduced vb2_get_buffer API and avoid
accessing buffers in the queue directly.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r-- | drivers/media/platform/sti/hva/hva-v4l2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/platform/sti/hva/hva-v4l2.c b/drivers/media/platform/sti/hva/hva-v4l2.c index c42623dccfd6..64004d15a9c9 100644 --- a/drivers/media/platform/sti/hva/hva-v4l2.c +++ b/drivers/media/platform/sti/hva/hva-v4l2.c @@ -566,6 +566,7 @@ static int hva_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf) */ struct vb2_queue *vq; struct hva_stream *stream; + struct vb2_buffer *vb2_buf; vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, buf->type); @@ -575,7 +576,8 @@ static int hva_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf) return -EINVAL; } - stream = (struct hva_stream *)vq->bufs[buf->index]; + vb2_buf = vb2_get_buffer(vq, buf->index); + stream = to_hva_stream(to_vb2_v4l2_buffer(vb2_buf)); stream->bytesused = buf->bytesused; } |