Commit f26d6a2b authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Andi Kleen

[PATCH] i386: convert to the kthread API

This patch just trivial converts from calling kernel_thread and daemonize
to just calling kthread_run.
Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 9e5e3162
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <linux/msi.h> #include <linux/msi.h>
#include <linux/htirq.h> #include <linux/htirq.h>
#include <linux/freezer.h> #include <linux/freezer.h>
#include <linux/kthread.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/smp.h> #include <asm/smp.h>
...@@ -661,8 +662,6 @@ static int balanced_irq(void *unused) ...@@ -661,8 +662,6 @@ static int balanced_irq(void *unused)
unsigned long prev_balance_time = jiffies; unsigned long prev_balance_time = jiffies;
long time_remaining = balanced_irq_interval; long time_remaining = balanced_irq_interval;
daemonize("kirqd");
/* push everything to CPU 0 to give us a starting point. */ /* push everything to CPU 0 to give us a starting point. */
for (i = 0 ; i < NR_IRQS ; i++) { for (i = 0 ; i < NR_IRQS ; i++) {
irq_desc[i].pending_mask = cpumask_of_cpu(0); irq_desc[i].pending_mask = cpumask_of_cpu(0);
...@@ -722,9 +721,8 @@ static int __init balanced_irq_init(void) ...@@ -722,9 +721,8 @@ static int __init balanced_irq_init(void)
} }
printk(KERN_INFO "Starting balanced_irq\n"); printk(KERN_INFO "Starting balanced_irq\n");
if (kernel_thread(balanced_irq, NULL, CLONE_KERNEL) >= 0) if (!IS_ERR(kthread_run(balanced_irq, NULL, "kirqd")))
return 0; return 0;
else
printk(KERN_ERR "balanced_irq_init: failed to spawn balanced_irq"); printk(KERN_ERR "balanced_irq_init: failed to spawn balanced_irq");
failed: failed:
for_each_possible_cpu(i) { for_each_possible_cpu(i) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment