[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <11769695873569-git-send-email-ebiederm@xmission.com>
Date: Thu, 19 Apr 2007 01:58:48 -0600
From: "Eric W. Biederman" <ebiederm@...ssion.com>
To: "<Andrew Morton" <akpm@...l.org>
Cc: <containers@...ts.osdl.org>, Oleg Nesterov <oleg@...sign.ru>,
Christoph Hellwig <hch@...radead.org>,
<linux-kernel@...r.kernel.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>
Subject: [PATCH] macintosh/therm_windtunnel.c: Convert to kthread API.
From: Eric W. Biederman <ebiederm@...ssion.com>
Start the g4fand using kthread_run not a combination
of kernel_thread and deamonize. This makes the code
a little simpler and more maintainable.
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Signed-off-by: Eric W. Biederman <ebiederm@...ssion.com>
---
drivers/macintosh/therm_windtunnel.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c
index a1d3a98..5d888e7 100644
--- a/drivers/macintosh/therm_windtunnel.c
+++ b/drivers/macintosh/therm_windtunnel.c
@@ -36,6 +36,7 @@
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/init.h>
+#include <linux/kthread.h>
#include <asm/prom.h>
#include <asm/machdep.h>
@@ -62,7 +63,6 @@ I2C_CLIENT_INSMOD;
static struct {
volatile int running;
struct completion completion;
- pid_t poll_task;
struct semaphore lock;
struct of_device *of_dev;
@@ -285,7 +285,6 @@ restore_regs( void )
static int
control_loop( void *dummy )
{
- daemonize("g4fand");
down( &x.lock );
setup_hardware();
@@ -323,7 +322,7 @@ do_attach( struct i2c_adapter *adapter )
if( x.thermostat && x.fan ) {
x.running = 1;
init_completion( &x.completion );
- x.poll_task = kernel_thread( control_loop, NULL, SIGCHLD | CLONE_KERNEL );
+ kthread_run( control_loop, NULL, "g4fand");
}
}
return ret;
--
1.5.0.g53756
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists