linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: uvc: destroy worker when function is unbound
@ 2025-07-11  8:35 oushixiong1025
  2025-07-11 11:04 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: oushixiong1025 @ 2025-07-11  8:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Michael Grzeschik, Sabyrzhan Tasbolatov, Frederic Weisbecker,
	linux-usb, linux-kernel, Xu Yang, Al Viro, Shixiong Ou

From: Shixiong Ou <oushixiong@kylinos.cn>

Destroy worker when function is unbound.

Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn>
---
 drivers/usb/gadget/function/f_uvc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c
index aa6ab666741a..e38477751894 100644
--- a/drivers/usb/gadget/function/f_uvc.c
+++ b/drivers/usb/gadget/function/f_uvc.c
@@ -992,6 +992,7 @@ static void uvc_function_unbind(struct usb_configuration *c,
 	uvcg_info(f, "%s()\n", __func__);
 
 	kthread_cancel_work_sync(&video->hw_submit);
+	kthread_destroy_worker(video->kworker);
 
 	if (video->async_wq)
 		destroy_workqueue(video->async_wq);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-20 11:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-11  8:35 [PATCH] usb: gadget: uvc: destroy worker when function is unbound oushixiong1025
2025-07-11 11:04 ` Greg Kroah-Hartman
     [not found]   ` <d430ec08-70c0-4d2a-81aa-234e8f759cfc@163.com>
2025-07-11 15:30     ` Greg Kroah-Hartman
2025-07-20 11:41       ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).