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:
Родитель
3dd8c09754
Коммит
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче