Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "usb: gadget: uvc: stop pump thread on video disable"

This reverts commit 3a63f86c6a6cb0601f0563a81574745da2979e3b.

Based on review comments, it was applied too soon and needs more work.

Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20231005081716.GA13853@pendragon.ideasonboard.com
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+1 -7
+1 -7
drivers/usb/gadget/function/uvc_video.c
··· 384 384 struct uvc_video_queue *queue = &video->queue; 385 385 /* video->max_payload_size is only set when using bulk transfer */ 386 386 bool is_bulk = video->max_payload_size; 387 - struct uvc_device *uvc = video->uvc; 388 387 struct usb_request *req = NULL; 389 388 struct uvc_buffer *buf; 390 389 unsigned long flags; 391 390 bool buf_done; 392 391 int ret; 393 392 394 - while (video->ep->enabled && uvc->state == UVC_STATE_STREAMING) { 393 + while (video->ep->enabled) { 395 394 /* 396 395 * Retrieve the first available USB request, protected by the 397 396 * request lock. ··· 488 489 */ 489 490 int uvcg_video_enable(struct uvc_video *video, int enable) 490 491 { 491 - struct uvc_device *uvc = video->uvc; 492 492 unsigned int i; 493 493 int ret; 494 494 ··· 498 500 } 499 501 500 502 if (!enable) { 501 - uvc->state = UVC_STATE_CONNECTED; 502 - 503 503 cancel_work_sync(&video->pump); 504 504 uvcg_queue_cancel(&video->queue, 0); 505 505 ··· 522 526 } else 523 527 video->encode = video->queue.use_sg ? 524 528 uvc_video_encode_isoc_sg : uvc_video_encode_isoc; 525 - 526 - uvc->state = UVC_STATE_STREAMING; 527 529 528 530 video->req_int_count = 0; 529 531