From: Eric W. Biederman <[email protected]> - unquoted
kthread_run replaces kernel_thread and dameonize.
allow_signal is unnecessary and has been removed.
tid_poll was unused and has been removed.
Cc: Jyoti Shah <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Eric W. Biederman <[email protected]>
---
drivers/pci/hotplug/ibmphp_hpc.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/pci/hotplug/ibmphp_hpc.c b/drivers/pci/hotplug/ibmphp_hpc.c
index 46abaa8..27e12f1 100644
--- a/drivers/pci/hotplug/ibmphp_hpc.c
+++ b/drivers/pci/hotplug/ibmphp_hpc.c
@@ -34,6 +34,7 @@
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/mutex.h>
+#include <linux/kthread.h>
#include "ibmphp.h"
@@ -101,7 +102,6 @@ static int to_debug = 0;
// global variables
//----------------------------------------------------------------------------
static int ibmphp_shutdown;
-static int tid_poll;
static struct mutex sem_hpcaccess; // lock access to HPC
static struct semaphore semOperations; // lock all operations and
// access to data structures
@@ -137,7 +137,6 @@ void __init ibmphp_hpc_initvars (void)
init_MUTEX_LOCKED (&sem_exit);
to_debug = 0;
ibmphp_shutdown = 0;
- tid_poll = 0;
debug ("%s - Exit\n", __FUNCTION__);
}
@@ -1060,12 +1059,8 @@ static int hpc_poll_thread (void *data)
{
debug ("%s - Entry\n", __FUNCTION__);
- daemonize("hpc_poll");
- allow_signal(SIGKILL);
-
poll_hpc ();
- tid_poll = 0;
debug ("%s - Exit\n", __FUNCTION__);
return 0;
}
@@ -1078,17 +1073,18 @@ static int hpc_poll_thread (void *data)
*---------------------------------------------------------------------*/
int __init ibmphp_hpc_start_poll_thread (void)
{
+ struct task_struct *task;
int rc = 0;
debug ("%s - Entry\n", __FUNCTION__);
- tid_poll = kernel_thread (hpc_poll_thread, NULL, 0);
- if (tid_poll < 0) {
+ task = kthread_run(hpc_poll_thread, NULL, "hpc_poll");
+ if (IS_ERR(task)) {
err ("%s - Error, thread not started\n", __FUNCTION__);
rc = -1;
}
- debug ("%s - Exit tid_poll[%d] rc[%d]\n", __FUNCTION__, tid_poll, rc);
+ debug ("%s - Exit rc[%d]\n", __FUNCTION__, rc);
return rc;
}
--
1.5.0.g53756
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]