diff options
Diffstat (limited to 'drivers/usb/gadget/uvc_queue.c')
-rw-r--r-- | drivers/usb/gadget/uvc_queue.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/gadget/uvc_queue.c b/drivers/usb/gadget/uvc_queue.c index d776adb2da67..0cdf89d32a15 100644 --- a/drivers/usb/gadget/uvc_queue.c +++ b/drivers/usb/gadget/uvc_queue.c | |||
@@ -543,11 +543,11 @@ done: | |||
543 | return ret; | 543 | return ret; |
544 | } | 544 | } |
545 | 545 | ||
546 | /* called with queue->irqlock held.. */ | ||
546 | static struct uvc_buffer * | 547 | static struct uvc_buffer * |
547 | uvc_queue_next_buffer(struct uvc_video_queue *queue, struct uvc_buffer *buf) | 548 | uvc_queue_next_buffer(struct uvc_video_queue *queue, struct uvc_buffer *buf) |
548 | { | 549 | { |
549 | struct uvc_buffer *nextbuf; | 550 | struct uvc_buffer *nextbuf; |
550 | unsigned long flags; | ||
551 | 551 | ||
552 | if ((queue->flags & UVC_QUEUE_DROP_INCOMPLETE) && | 552 | if ((queue->flags & UVC_QUEUE_DROP_INCOMPLETE) && |
553 | buf->buf.length != buf->buf.bytesused) { | 553 | buf->buf.length != buf->buf.bytesused) { |
@@ -556,14 +556,12 @@ uvc_queue_next_buffer(struct uvc_video_queue *queue, struct uvc_buffer *buf) | |||
556 | return buf; | 556 | return buf; |
557 | } | 557 | } |
558 | 558 | ||
559 | spin_lock_irqsave(&queue->irqlock, flags); | ||
560 | list_del(&buf->queue); | 559 | list_del(&buf->queue); |
561 | if (!list_empty(&queue->irqqueue)) | 560 | if (!list_empty(&queue->irqqueue)) |
562 | nextbuf = list_first_entry(&queue->irqqueue, struct uvc_buffer, | 561 | nextbuf = list_first_entry(&queue->irqqueue, struct uvc_buffer, |
563 | queue); | 562 | queue); |
564 | else | 563 | else |
565 | nextbuf = NULL; | 564 | nextbuf = NULL; |
566 | spin_unlock_irqrestore(&queue->irqlock, flags); | ||
567 | 565 | ||
568 | buf->buf.sequence = queue->sequence++; | 566 | buf->buf.sequence = queue->sequence++; |
569 | do_gettimeofday(&buf->buf.timestamp); | 567 | do_gettimeofday(&buf->buf.timestamp); |