media: uvcvideo: Split uvc_video_enable into two

uvc_video_enable() is used both to start and stop the video stream
object, however the single function entry point shares no code between
the two operations.

Split the function into two distinct calls, and rename to
uvc_video_start_streaming() and uvc_video_stop_streaming() as
appropriate.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
Kieran Bingham
2018-11-05 10:28:24 -05:00
zatwierdzone przez Mauro Carvalho Chehab
rodzic b012186ace
commit 571e70dbd4
3 zmienionych plików z 30 dodań i 32 usunięć

Wyświetl plik

@@ -176,7 +176,7 @@ static int uvc_start_streaming(struct vb2_queue *vq, unsigned int count)
queue->buf_used = 0;
ret = uvc_video_enable(stream, 1);
ret = uvc_video_start_streaming(stream);
if (ret == 0)
return 0;
@@ -194,7 +194,7 @@ static void uvc_stop_streaming(struct vb2_queue *vq)
lockdep_assert_irqs_enabled();
if (vq->type != V4L2_BUF_TYPE_META_CAPTURE)
uvc_video_enable(uvc_queue_to_stream(queue), 0);
uvc_video_stop_streaming(uvc_queue_to_stream(queue));
spin_lock_irq(&queue->irqlock);
uvc_queue_return_buffers(queue, UVC_BUF_STATE_ERROR);