aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base')
-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}