mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-07 21:53:44 +00:00
media: mtk-jpeg: 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>
This commit is contained in:
parent
3dd8c09754
commit
8eebd6150a
@ -518,7 +518,7 @@ static int mtk_jpeg_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
vb = vq->bufs[buf->index];
|
||||
vb = vb2_get_buffer(vq, buf->index);
|
||||
jpeg_src_buf = mtk_jpeg_vb2_to_srcbuf(vb);
|
||||
jpeg_src_buf->flags = (buf->m.planes[0].bytesused == 0) ?
|
||||
MTK_JPEG_BUF_FLAGS_LAST_FRAME : MTK_JPEG_BUF_FLAGS_INIT;
|
||||
|
Loading…
Reference in New Issue
Block a user