* [PATCH] apm-emulation: Make use of the helper macro kthread_run()
@ 2024-10-10 9:23 胡连勤
2024-10-10 9:30 ` gregkh
0 siblings, 1 reply; 3+ messages in thread
From: 胡连勤 @ 2024-10-10 9:23 UTC (permalink / raw)
To: jikos, arnd, gregkh; +Cc: linux-kernel, 胡连勤
From: Lianqin Hu <hulianqin@vivo.com>
Repalce kthread_create/wake_up_process() with kthread_run()
to simplify the code.
Signed-off-by: Lianqin Hu <hulianqin@vivo.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 e795390b070f..3c183370a5d6 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.39.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] apm-emulation: Make use of the helper macro kthread_run()
2024-10-10 9:23 [PATCH] apm-emulation: Make use of the helper macro kthread_run() 胡连勤
@ 2024-10-10 9:30 ` gregkh
0 siblings, 0 replies; 3+ messages in thread
From: gregkh @ 2024-10-10 9:30 UTC (permalink / raw)
To: 胡连勤; +Cc: jikos, arnd, linux-kernel
On Thu, Oct 10, 2024 at 09:23:46AM +0000, 胡连勤 wrote:
> From: Lianqin Hu <hulianqin@vivo.com>
>
> Repalce kthread_create/wake_up_process() with kthread_run()
> to simplify the code.
>
> Signed-off-by: Lianqin Hu <hulianqin@vivo.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 e795390b070f..3c183370a5d6 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);
Do you have this hardware? If not, I would not recommend making changes
like this without being able to test it.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] apm-emulation: Make use of the helper macro kthread_run()
@ 2021-10-21 8:38 Cai Huoqing
0 siblings, 0 replies; 3+ messages 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 [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-10 9:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-10 9:23 [PATCH] apm-emulation: Make use of the helper macro kthread_run() 胡连勤
2024-10-10 9:30 ` gregkh
-- strict thread matches above, loose matches on Subject: below --
2021-10-21 8:38 Cai Huoqing
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®