aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSukadev Bhattiprolu <sukadev@us.ibm.com>2006-09-29 04:59:31 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 12:18:08 -0400
commit563d075702454f6fa745ff8b0db605c73478078e (patch)
tree8879eeb7aa0c6f7f944cad5cab6b4587fac977e2 /drivers
parenta49a4af759c0193d42aeaeefb4df7de8973dd713 (diff)
[PATCH] kthread: drivers/base/firmware_class.c
Replace kernel_thread() call in drivers/base/firmware_class.c with kthread_create() since kernel_thread() is deprecated in drivers. Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com> Cc: Cedric Le Goater <clg@fr.ibm.com> Cc: Serge E. Hallyn <serue@us.ibm.com> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: Manuel Estrada Sainz <ranty@debian.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/firmware_class.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 77bf8826e2f9..14615694ae9a 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -16,6 +16,7 @@
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/bitops.h> 17#include <linux/bitops.h>
18#include <linux/mutex.h> 18#include <linux/mutex.h>
19#include <linux/kthread.h>
19 20
20#include <linux/firmware.h> 21#include <linux/firmware.h>
21#include "base.h" 22#include "base.h"
@@ -511,7 +512,6 @@ request_firmware_work_func(void *arg)
511 WARN_ON(1); 512 WARN_ON(1);
512 return 0; 513 return 0;
513 } 514 }
514 daemonize("%s/%s", "firmware", fw_work->name);
515 ret = _request_firmware(&fw, fw_work->name, fw_work->device, 515 ret = _request_firmware(&fw, fw_work->name, fw_work->device,
516 fw_work->uevent); 516 fw_work->uevent);
517 if (ret < 0) 517 if (ret < 0)
@@ -546,9 +546,9 @@ request_firmware_nowait(
546 const char *name, struct device *device, void *context, 546 const char *name, struct device *device, void *context,
547 void (*cont)(const struct firmware *fw, void *context)) 547 void (*cont)(const struct firmware *fw, void *context))
548{ 548{
549 struct task_struct *task;
549 struct firmware_work *fw_work = kmalloc(sizeof (struct firmware_work), 550 struct firmware_work *fw_work = kmalloc(sizeof (struct firmware_work),
550 GFP_ATOMIC); 551 GFP_ATOMIC);
551 int ret;
552 552
553 if (!fw_work) 553 if (!fw_work)
554 return -ENOMEM; 554 return -ENOMEM;
@@ -566,14 +566,14 @@ request_firmware_nowait(
566 .uevent = uevent, 566 .uevent = uevent,
567 }; 567 };
568 568
569 ret = kernel_thread(request_firmware_work_func, fw_work, 569 task = kthread_run(request_firmware_work_func, fw_work,
570 CLONE_FS | CLONE_FILES); 570 "firmware/%s", name);
571 571
572 if (ret < 0) { 572 if (IS_ERR(task)) {
573 fw_work->cont(NULL, fw_work->context); 573 fw_work->cont(NULL, fw_work->context);
574 module_put(fw_work->module); 574 module_put(fw_work->module);
575 kfree(fw_work); 575 kfree(fw_work);
576 return ret; 576 return PTR_ERR(task);
577 } 577 }
578 return 0; 578 return 0;
579} 579}