Repalce kthread_create/wake_up_process() with kthread_run()
to simplify the code.
Signed-off-by: Cai Huoqing <[email protected]>
---
drivers/char/apm-emulation.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/char/apm-emulation.c b/drivers/char/apm-emulation.c
index 230cf852fa9c..c18cdf4ecfd8 100644
--- a/drivers/char/apm-emulation.c
+++ b/drivers/char/apm-emulation.c
@@ -636,13 +636,12 @@ static int __init apm_init(void)
return -ENODEV;
}
- kapmd_tsk = kthread_create(kapmd, NULL, "kapmd");
+ kapmd_tsk = kthread_run(kapmd, NULL, "kapmd");
if (IS_ERR(kapmd_tsk)) {
ret = PTR_ERR(kapmd_tsk);
kapmd_tsk = NULL;
goto out;
}
- wake_up_process(kapmd_tsk);
#ifdef CONFIG_PROC_FS
proc_create_single("apm", 0, NULL, proc_apm_show);
--
2.25.1