mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
media: uvcvideo: Do not open code uvc_queue_get_current_buffer
Do not re-implement uvc_queue_get_current_buffer() logic inside uvc_video_complete(), just call the function. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Link: https://patch.msgid.link/20260417-uvc-meta-partial-v2-1-31d274af7d2d@chromium.org Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com> Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
6d27f92c54
commit
a307316ae7
|
|
@ -1704,7 +1704,6 @@ static void uvc_video_complete(struct urb *urb)
|
|||
struct vb2_queue *vb2_qmeta = stream->meta.queue.vdev.queue;
|
||||
struct uvc_buffer *buf = NULL;
|
||||
struct uvc_buffer *buf_meta = NULL;
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
switch (urb->status) {
|
||||
|
|
@ -1730,13 +1729,8 @@ static void uvc_video_complete(struct urb *urb)
|
|||
|
||||
buf = uvc_queue_get_current_buffer(queue);
|
||||
|
||||
if (vb2_qmeta) {
|
||||
spin_lock_irqsave(&qmeta->irqlock, flags);
|
||||
if (!list_empty(&qmeta->irqqueue))
|
||||
buf_meta = list_first_entry(&qmeta->irqqueue,
|
||||
struct uvc_buffer, queue);
|
||||
spin_unlock_irqrestore(&qmeta->irqlock, flags);
|
||||
}
|
||||
if (vb2_qmeta)
|
||||
buf_meta = uvc_queue_get_current_buffer(qmeta);
|
||||
|
||||
/* Re-initialise the URB async work. */
|
||||
uvc_urb->async_operations = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user