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.

usb: f_mass_storage: Make use of the helper macro kthread_run()

Replace kthread_create/wake_up_process() with kthread_run()
to simplify the code.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Link: https://lore.kernel.org/r/20240903014249.3098082-1-lihongbo22@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Hongbo Li and committed by
Greg Kroah-Hartman
9299f12c a17f04d4

+1 -2
+1 -2
drivers/usb/gadget/function/f_mass_storage.c
··· 3050 3050 if (!common->thread_task) { 3051 3051 common->state = FSG_STATE_NORMAL; 3052 3052 common->thread_task = 3053 - kthread_create(fsg_main_thread, common, "file-storage"); 3053 + kthread_run(fsg_main_thread, common, "file-storage"); 3054 3054 if (IS_ERR(common->thread_task)) { 3055 3055 ret = PTR_ERR(common->thread_task); 3056 3056 common->thread_task = NULL; ··· 3059 3059 } 3060 3060 DBG(common, "I/O thread pid: %d\n", 3061 3061 task_pid_nr(common->thread_task)); 3062 - wake_up_process(common->thread_task); 3063 3062 } 3064 3063 3065 3064 fsg->gadget = gadget;