diff options
| author | Eric W. Biederman <ebiederm@xmission.com> | 2007-04-26 03:04:40 -0400 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-05-03 09:16:56 -0400 |
| commit | 134c99e907ef2572cdaa148c191984b95d671981 (patch) | |
| tree | 330f39bb2fc581dd78388f5a3105915ddee5c7ce | |
| parent | 73b6a2be8b29b2067aa3c0f1d6433b6148d88705 (diff) | |
[ARM] ecard: convert to use the kthread API
This patch modifies the startup of kecardd to use kthread_run not a
kernel_thread combination of kernel_thread and daemonize. Making the code
slightly simpler and more maintainable.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| -rw-r--r-- | arch/arm/kernel/ecard.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index 6eb80acea379..869de6d3ad53 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | #include <linux/device.h> | 40 | #include <linux/device.h> |
| 41 | #include <linux/init.h> | 41 | #include <linux/init.h> |
| 42 | #include <linux/mutex.h> | 42 | #include <linux/mutex.h> |
| 43 | #include <linux/kthread.h> | ||
| 43 | 44 | ||
| 44 | #include <asm/dma.h> | 45 | #include <asm/dma.h> |
| 45 | #include <asm/ecard.h> | 46 | #include <asm/ecard.h> |
| @@ -263,8 +264,6 @@ static int ecard_init_mm(void) | |||
| 263 | static int | 264 | static int |
| 264 | ecard_task(void * unused) | 265 | ecard_task(void * unused) |
| 265 | { | 266 | { |
| 266 | daemonize("kecardd"); | ||
| 267 | |||
| 268 | /* | 267 | /* |
| 269 | * Allocate a mm. We're not a lazy-TLB kernel task since we need | 268 | * Allocate a mm. We're not a lazy-TLB kernel task since we need |
| 270 | * to set page table entries where the user space would be. Note | 269 | * to set page table entries where the user space would be. Note |
| @@ -1059,13 +1058,14 @@ ecard_probe(int slot, card_type_t type) | |||
| 1059 | */ | 1058 | */ |
| 1060 | static int __init ecard_init(void) | 1059 | static int __init ecard_init(void) |
| 1061 | { | 1060 | { |
| 1062 | int slot, irqhw, ret; | 1061 | struct task_struct *task; |
| 1062 | int slot, irqhw; | ||
| 1063 | 1063 | ||
| 1064 | ret = kernel_thread(ecard_task, NULL, CLONE_KERNEL); | 1064 | task = kthread_run(ecard_task, NULL, "kecardd"); |
| 1065 | if (ret < 0) { | 1065 | if (IS_ERR(task)) { |
| 1066 | printk(KERN_ERR "Ecard: unable to create kernel thread: %d\n", | 1066 | printk(KERN_ERR "Ecard: unable to create kernel thread: %d\n", |
| 1067 | ret); | 1067 | PTR_ERR(task)); |
| 1068 | return ret; | 1068 | return PTR_ERR(task); |
| 1069 | } | 1069 | } |
| 1070 | 1070 | ||
| 1071 | printk("Probing expansion cards\n"); | 1071 | printk("Probing expansion cards\n"); |
