From: Eric W. Biederman <ebiederm@xmission.com>
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.
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
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 f1c0fb9..6c15f5f 100644
--- a/arch/arm/kernel/ecard.c
+++ b/arch/arm/kernel/ecard.c
@@ -40,6 +40,7 @@
#include <linux/device.h>
#include <linux/init.h>
#include <linux/mutex.h>
+#include <linux/kthread.h>
#include <asm/dma.h>
#include <asm/ecard.h>
@@ -263,8 +264,6 @@ static int ecard_init_mm(void)
static int
ecard_task(void * unused)
{
- daemonize("kecardd");
-
/*
* Allocate a mm. We're not a lazy-TLB kernel task since we need
* to set page table entries where the user space would be. Note
@@ -1058,13 +1057,14 @@ ecard_probe(int slot, card_type_t type)
*/
static int __init ecard_init(void)
{
- int slot, irqhw, ret;
+ struct task_struct *task;
+ int slot, irqhw;
- ret = kernel_thread(ecard_task, NULL, CLONE_KERNEL);
- if (ret < 0) {
+ task = kthread_run(ecard_task, NULL, "kecardd");
+ if (IS_ERR(task)) {
printk(KERN_ERR "Ecard: unable to create kernel thread: %d\n",
- ret);
- return ret;
+ PTR_ERR(task));
+ return PTR_ERR(task);
}
printk("Probing expansion cards\n");
--
1.5.0.g53756
-
| Alan Cox | [PATCH 00/76] Queued TTY Patches |
| Linus Torvalds | Linux 2.6.27-rc8 |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| Borislav Petkov | 2.6.23-rc1: no setup signature found... |
git: | |
| Kyle Moffett | Using GIT to store /etc (Or: How to make GIT store all file permission bits) |
| Johannes Sixt | [PATCH 01/40] Add compat/regex.[ch] and compat/fnmatch.[ch]. |
| Junio C Hamano | Re: Considering teaching plumbing to users harmful |
| Michael J Gruber | Re: RFC: grafts generalised |
| Markus Wernig | host to host ipsec link |
| Richard Stallman | Real men don't attack straw men |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Stuart Henderson | Re: Server just freeze with no reason |
| David Miller | [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Denys Fedoryshchenko | packetloss, on e1000e worse than r8169? |
| Thomas Jarosch | Re: TCP connection stalls under 2.6.24.7 |
