Use the proper API instead of open coding it.
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
{
struct task_struct *task;
- task = kthread_create_on_node(bL_switcher_thread, arg,
- cpu_to_node(cpu), "kswitcher_%d", cpu);
- if (!IS_ERR(task)) {
- kthread_bind(task, cpu);
- wake_up_process(task);
- } else
+ task = kthread_run_on_cpu(bL_switcher_thread, arg,
+ cpu, "kswitcher_%d");
+ if (IS_ERR(task))
pr_err("%s failed for CPU %d\n", __func__, cpu);
+
return task;
}