mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
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>
This commit is contained in:
parent
a17f04d4f2
commit
9299f12c20
1 changed files with 1 additions and 2 deletions
|
|
@ -3050,7 +3050,7 @@ static int fsg_bind(struct usb_configuration *c, struct usb_function *f)
|
|||
if (!common->thread_task) {
|
||||
common->state = FSG_STATE_NORMAL;
|
||||
common->thread_task =
|
||||
kthread_create(fsg_main_thread, common, "file-storage");
|
||||
kthread_run(fsg_main_thread, common, "file-storage");
|
||||
if (IS_ERR(common->thread_task)) {
|
||||
ret = PTR_ERR(common->thread_task);
|
||||
common->thread_task = NULL;
|
||||
|
|
@ -3059,7 +3059,6 @@ static int fsg_bind(struct usb_configuration *c, struct usb_function *f)
|
|||
}
|
||||
DBG(common, "I/O thread pid: %d\n",
|
||||
task_pid_nr(common->thread_task));
|
||||
wake_up_process(common->thread_task);
|
||||
}
|
||||
|
||||
fsg->gadget = gadget;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue