git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
drivers
/
base
/
firmware_class.c
diff --git
a/drivers/base/firmware_class.c
b/drivers/base/firmware_class.c
index
8ff239f
..
6e17867
100644
(file)
--- a/
drivers/base/firmware_class.c
+++ b/
drivers/base/firmware_class.c
@@
-12,7
+12,7
@@
#include <linux/init.h>
#include <linux/timer.h>
#include <linux/vmalloc.h>
#include <linux/init.h>
#include <linux/timer.h>
#include <linux/vmalloc.h>
-#include <
asm/hardirq
.h>
+#include <
linux/interrupt
.h>
#include <linux/bitops.h>
#include <asm/semaphore.h>
#include <linux/bitops.h>
#include <asm/semaphore.h>
@@
-68,7
+68,7
@@
firmware_timeout_show(struct class *class, char *buf)
* firmware will be provided.
*
* Note: zero means 'wait for ever'
* firmware will be provided.
*
* Note: zero means 'wait for ever'
- *
+ *
**/
static ssize_t
firmware_timeout_store(struct class *class, const char *buf, size_t count)
**/
static ssize_t
firmware_timeout_store(struct class *class, const char *buf, size_t count)
@@
-121,7
+121,7
@@
firmware_loading_show(struct class_device *class_dev, char *buf)
/**
* firmware_loading_store: - loading control file
* Description:
/**
* firmware_loading_store: - loading control file
* Description:
- * The relevant values are:
+ * The relevant values are:
*
* 1: Start a load, discarding any previous partial load.
* 0: Conclude the load and handle the data to the driver code.
*
* 1: Start a load, discarding any previous partial load.
* 0: Conclude the load and handle the data to the driver code.
@@
-235,6
+235,8
@@
firmware_data_write(struct kobject *kobj,
struct firmware *fw;
ssize_t retval;
struct firmware *fw;
ssize_t retval;
+ if (!capable(CAP_SYS_RAWIO))
+ return -EPERM;
down(&fw_lock);
fw = fw_priv->fw;
if (test_bit(FW_STATUS_DONE, &fw_priv->status)) {
down(&fw_lock);
fw = fw_priv->fw;
if (test_bit(FW_STATUS_DONE, &fw_priv->status)) {
@@
-376,7
+378,7
@@
out:
return retval;
}
return retval;
}
-/**
+/**
* request_firmware: - request firmware to hotplug and wait for it
* Description:
* @firmware will be used to return a firmware image by the name
* request_firmware: - request firmware to hotplug and wait for it
* Description:
* @firmware will be used to return a firmware image by the name
@@
-457,7
+459,7
@@
release_firmware(const struct firmware *fw)
/**
* register_firmware: - provide a firmware image for later usage
/**
* register_firmware: - provide a firmware image for later usage
- *
+ *
* Description:
* Make sure that @data will be available by requesting firmware @name.
*
* Description:
* Make sure that @data will be available by requesting firmware @name.
*
@@
-541,7
+543,7
@@
request_firmware_nowait(
ret = kernel_thread(request_firmware_work_func, fw_work,
CLONE_FS | CLONE_FILES);
ret = kernel_thread(request_firmware_work_func, fw_work,
CLONE_FS | CLONE_FILES);
-
+
if (ret < 0) {
fw_work->cont(NULL, fw_work->context);
return ret;
if (ret < 0) {
fw_work->cont(NULL, fw_work->context);
return ret;