diff options
author | Devendra Naga <devendra.aaru@gmail.com> | 2015-02-19 14:08:30 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-26 17:23:46 -0800 |
commit | 31c9b9cf40f8f03f6a7484f2c06c5eb31b3735ce (patch) | |
tree | cf95ba04cb1f20f399eb51cb0165498d376d7c0f /drivers/staging/unisys | |
parent | edff162ce38ec1cea17f3cadd095e8e449d79735 (diff) |
unisys: replace kthread_create and wake_up_process with kthread_run
kthread_run calls kthread_create and if the thread is created
it then calls wake_up_process on the corresponding returned
task struct. So the code can be simplified by calling just
kthread_run.
Cc: Ken Cox <jkc@redhat.com>
Cc: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r-- | drivers/staging/unisys/uislib/uisthread.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/unisys/uislib/uisthread.c b/drivers/staging/unisys/uislib/uisthread.c index 25adf1a7307c..c5c68cb1286b 100644 --- a/drivers/staging/unisys/uislib/uisthread.c +++ b/drivers/staging/unisys/uislib/uisthread.c @@ -44,13 +44,12 @@ uisthread_start(struct uisthread_info *thrinfo, thrinfo->should_stop = 0; /* used to stop the thread */ init_completion(&thrinfo->has_stopped); - thrinfo->task = kthread_create(threadfn, thrcontext, name, NULL); + thrinfo->task = kthread_run(threadfn, thrcontext, name); if (IS_ERR(thrinfo->task)) { thrinfo->id = 0; return 0; /* failure */ } thrinfo->id = thrinfo->task->pid; - wake_up_process(thrinfo->task); LOGINF("started thread pid:%d\n", thrinfo->id); return 1; } |