#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>
* 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)
/**
* 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.
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)) {
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
/**
* register_firmware: - provide a firmware image for later usage
- *
+ *
* Description:
* Make sure that @data will be available by requesting firmware @name.
*
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;