lkml.org 
[lkml]   [2007]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] powerpc pseries rtasd: Convert to kthread API.
    Date
    From: Eric W. Biederman <ebiederm@xmission.com>

    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 <paulus@samba.org>
    Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
    ---
    arch/powerpc/platforms/pseries/rtasd.c | 5 ++---
    1 files changed, 2 insertions(+), 3 deletions(-)

    diff --git a/arch/powerpc/platforms/pseries/rtasd.c b/arch/powerpc/platforms/pseries/rtasd.c
    index 77d0937..919a374 100644
    --- a/arch/powerpc/platforms/pseries/rtasd.c
    +++ b/arch/powerpc/platforms/pseries/rtasd.c
    @@ -20,6 +20,7 @@
    #include <linux/spinlock.h>
    #include <linux/cpu.h>
    #include <linux/delay.h>
    +#include <linux/kthread.h>

    #include <asm/uaccess.h>
    #include <asm/io.h>
    @@ -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;
    --
    1.5.0.g53756
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-04-19 10:21    [W:0.021 / U:1.712 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site