Skip to content

Commit 9299f12

Browse files
Hongbo Ligregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Hongbo Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a17f04d commit 9299f12

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/usb/gadget/function/f_mass_storage.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3050,7 +3050,7 @@ static int fsg_bind(struct usb_configuration *c, struct usb_function *f)
30503050
if (!common->thread_task) {
30513051
common->state = FSG_STATE_NORMAL;
30523052
common->thread_task =
3053-
kthread_create(fsg_main_thread, common, "file-storage");
3053+
kthread_run(fsg_main_thread, common, "file-storage");
30543054
if (IS_ERR(common->thread_task)) {
30553055
ret = PTR_ERR(common->thread_task);
30563056
common->thread_task = NULL;
@@ -3059,7 +3059,6 @@ static int fsg_bind(struct usb_configuration *c, struct usb_function *f)
30593059
}
30603060
DBG(common, "I/O thread pid: %d\n",
30613061
task_pid_nr(common->thread_task));
3062-
wake_up_process(common->thread_task);
30633062
}
30643063

30653064
fsg->gadget = gadget;

0 commit comments

Comments
 (0)