aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-09-30 23:45:41 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-30 23:45:41 -0400
commit1c7da74c4aab595a994beb5fe728ebf0d0b41f59 (patch)
tree64128abdf9550ebb51d8f3ee6732d7350b9c62f2 /drivers/base
parentaebb1153ac54ddbbd3d3f0481a193f4bf0ead53b (diff)
parent1bdfd554be94def718323659173517c5d4a69d25 (diff)
Merge branch 'master' into upstream
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/class.c8
-rw-r--r--drivers/base/firmware_class.c12
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c
index b06b0e2b9c62..b32b77ff2dcd 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -228,7 +228,7 @@ error:
228 228
229/** 229/**
230 * class_destroy - destroys a struct class structure 230 * class_destroy - destroys a struct class structure
231 * @cs: pointer to the struct class that is to be destroyed 231 * @cls: pointer to the struct class that is to be destroyed
232 * 232 *
233 * Note, the pointer to be destroyed must have been created with a call 233 * Note, the pointer to be destroyed must have been created with a call
234 * to class_create(). 234 * to class_create().
@@ -658,9 +658,9 @@ int class_device_register(struct class_device *class_dev)
658 658
659/** 659/**
660 * class_device_create - creates a class device and registers it with sysfs 660 * class_device_create - creates a class device and registers it with sysfs
661 * @cs: pointer to the struct class that this device should be registered to. 661 * @cls: pointer to the struct class that this device should be registered to.
662 * @parent: pointer to the parent struct class_device of this new device, if any. 662 * @parent: pointer to the parent struct class_device of this new device, if any.
663 * @dev: the dev_t for the char device to be added. 663 * @devt: the dev_t for the char device to be added.
664 * @device: a pointer to a struct device that is assiociated with this class device. 664 * @device: a pointer to a struct device that is assiociated with this class device.
665 * @fmt: string for the class device's name 665 * @fmt: string for the class device's name
666 * 666 *
@@ -766,7 +766,7 @@ void class_device_unregister(struct class_device *class_dev)
766/** 766/**
767 * class_device_destroy - removes a class device that was created with class_device_create() 767 * class_device_destroy - removes a class device that was created with class_device_create()
768 * @cls: the pointer to the struct class that this device was registered * with. 768 * @cls: the pointer to the struct class that this device was registered * with.
769 * @dev: the dev_t of the device that was previously registered. 769 * @devt: the dev_t of the device that was previously registered.
770 * 770 *
771 * This call unregisters and cleans up a class device that was created with a 771 * This call unregisters and cleans up a class device that was created with a
772 * call to class_device_create() 772 * call to class_device_create()
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}