From: Eric W. Biederman This patch modifies the startup of rtasd to use kthread_run instaed of a combination of kernel_thread and daemonize. Making the code a little simpler and more maintainble. Cc: Paul Mackerras Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton --- arch/powerpc/platforms/pseries/rtasd.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff -puN arch/powerpc/platforms/pseries/rtasd.c~powerpc-pseries-rtasd-convert-to-kthread-api arch/powerpc/platforms/pseries/rtasd.c --- a/arch/powerpc/platforms/pseries/rtasd.c~powerpc-pseries-rtasd-convert-to-kthread-api +++ a/arch/powerpc/platforms/pseries/rtasd.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -429,8 +430,6 @@ static int rtasd(void *unused) int event_scan = rtas_token("event-scan"); int rc; - daemonize("rtasd"); - if (event_scan == RTAS_UNKNOWN_SERVICE || get_eventscan_parms() == -1) goto error; @@ -497,7 +496,7 @@ static int __init rtas_init(void) else printk(KERN_ERR "Failed to create error_log proc entry\n"); - if (kernel_thread(rtasd, NULL, CLONE_FS) < 0) + if (IS_ERR(kthread_run(rtasd, NULL, "rtasd"))) printk(KERN_ERR "Failed to start RTAS daemon\n"); return 0; _