* [PATCH] apm-emulation: Make use of the helper macro kthread_run()
@ 2021-10-21 8:38 Cai Huoqing
0 siblings, 0 replies; only message in thread
From: Cai Huoqing @ 2021-10-21 8:38 UTC (permalink / raw)
To: caihuoqing; +Cc: Jiri Kosina, Arnd Bergmann, Greg Kroah-Hartman, linux-kernel
Repalce kthread_create/wake_up_process() with kthread_run()
to simplify the code.
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-21 8:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21 8:38 [PATCH] apm-emulation: Make use of the helper macro kthread_run() Cai Huoqing
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).