diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2008-07-14 18:49:04 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-07-14 18:51:11 -0400 |
commit | 751851af7aae9b8bd5a60b3897209081fbc18b2b (patch) | |
tree | 5cb8dbb71d691a760da61e319796800ee42cc1c5 /include/linux/firmware.h | |
parent | a41eebab7537890409ea9dfe0fcda9b5fbdb090d (diff) | |
parent | d71792ac3d48df6693f7b339e02494efc27036c3 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Conflicts:
sound/pci/Kconfig
Diffstat (limited to 'include/linux/firmware.h')
-rw-r--r-- | include/linux/firmware.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/include/linux/firmware.h b/include/linux/firmware.h index 6c7eff2ebada..c8ecf5b2a207 100644 --- a/include/linux/firmware.h +++ b/include/linux/firmware.h | |||
@@ -1,18 +1,39 @@ | |||
1 | #ifndef _LINUX_FIRMWARE_H | 1 | #ifndef _LINUX_FIRMWARE_H |
2 | #define _LINUX_FIRMWARE_H | 2 | #define _LINUX_FIRMWARE_H |
3 | |||
3 | #include <linux/module.h> | 4 | #include <linux/module.h> |
4 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <linux/compiler.h> | ||
7 | |||
5 | #define FIRMWARE_NAME_MAX 30 | 8 | #define FIRMWARE_NAME_MAX 30 |
6 | #define FW_ACTION_NOHOTPLUG 0 | 9 | #define FW_ACTION_NOHOTPLUG 0 |
7 | #define FW_ACTION_HOTPLUG 1 | 10 | #define FW_ACTION_HOTPLUG 1 |
8 | 11 | ||
9 | struct firmware { | 12 | struct firmware { |
10 | size_t size; | 13 | size_t size; |
11 | u8 *data; | 14 | const u8 *data; |
12 | }; | 15 | }; |
13 | 16 | ||
14 | struct device; | 17 | struct device; |
15 | 18 | ||
19 | struct builtin_fw { | ||
20 | char *name; | ||
21 | void *data; | ||
22 | unsigned long size; | ||
23 | }; | ||
24 | |||
25 | /* We have to play tricks here much like stringify() to get the | ||
26 | __COUNTER__ macro to be expanded as we want it */ | ||
27 | #define __fw_concat1(x, y) x##y | ||
28 | #define __fw_concat(x, y) __fw_concat1(x, y) | ||
29 | |||
30 | #define DECLARE_BUILTIN_FIRMWARE(name, blob) \ | ||
31 | DECLARE_BUILTIN_FIRMWARE_SIZE(name, &(blob), sizeof(blob)) | ||
32 | |||
33 | #define DECLARE_BUILTIN_FIRMWARE_SIZE(name, blob, size) \ | ||
34 | static const struct builtin_fw __fw_concat(__builtin_fw,__COUNTER__) \ | ||
35 | __used __section(.builtin_fw) = { name, blob, size } | ||
36 | |||
16 | #if defined(CONFIG_FW_LOADER) || (defined(CONFIG_FW_LOADER_MODULE) && defined(MODULE)) | 37 | #if defined(CONFIG_FW_LOADER) || (defined(CONFIG_FW_LOADER_MODULE) && defined(MODULE)) |
17 | int request_firmware(const struct firmware **fw, const char *name, | 38 | int request_firmware(const struct firmware **fw, const char *name, |
18 | struct device *device); | 39 | struct device *device); |