1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
--- a/include/linux/compat-2.6.32.h
+++ b/include/linux/compat-2.6.32.h
@@ -9,40 +9,6 @@
#include <linux/compat.h>
#include <net/iw_handler.h>
#include <linux/workqueue.h>
-#include <linux/firmware.h>
-
-#define release_firmware compat_release_firmware
-#define request_firmware compat_request_firmware
-#define request_firmware_nowait compat_request_firmware_nowait
-
-#if defined(CONFIG_FW_LOADER) || (defined(CONFIG_FW_LOADER_MODULE) && defined(MODULE))
-int compat_request_firmware(const struct firmware **fw, const char *name,
- struct device *device);
-int compat_request_firmware_nowait(
- struct module *module, int uevent,
- const char *name, struct device *device, gfp_t gfp, void *context,
- void (*cont)(const struct firmware *fw, void *context));
-
-void compat_release_firmware(const struct firmware *fw);
-#else
-static inline int compat_request_firmware(const struct firmware **fw,
- const char *name,
- struct device *device)
-{
- return -EINVAL;
-}
-static inline int request_firmware_nowait(
- struct module *module, int uevent,
- const char *name, struct device *device, gfp_t gfp, void *context,
- void (*cont)(const struct firmware *fw, void *context))
-{
- return -EINVAL;
-}
-
-static inline void compat_release_firmware(const struct firmware *fw)
-{
-}
-#endif
#define SDIO_VENDOR_ID_INTEL 0x0089
#define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX 0x1402
--- a/include/linux/compat-2.6.33.h
+++ b/include/linux/compat-2.6.33.h
@@ -10,6 +10,40 @@
#include <pcmcia/cistpl.h>
#include <pcmcia/ds.h>
#include <linux/kfifo.h>
+#include <linux/firmware.h>
+
+#define release_firmware compat_release_firmware
+#define request_firmware compat_request_firmware
+#define request_firmware_nowait compat_request_firmware_nowait
+
+#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
+int compat_request_firmware(const struct firmware **fw, const char *name,
+ struct device *device);
+int compat_request_firmware_nowait(
+ struct module *module, int uevent,
+ const char *name, struct device *device, gfp_t gfp, void *context,
+ void (*cont)(const struct firmware *fw, void *context));
+
+void compat_release_firmware(const struct firmware *fw);
+#else
+static inline int compat_request_firmware(const struct firmware **fw,
+ const char *name,
+ struct device *device)
+{
+ return -EINVAL;
+}
+static inline int request_firmware_nowait(
+ struct module *module, int uevent,
+ const char *name, struct device *device, gfp_t gfp, void *context,
+ void (*cont)(const struct firmware *fw, void *context))
+{
+ return -EINVAL;
+}
+
+static inline void compat_release_firmware(const struct firmware *fw)
+{
+}
+#endif
#define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */
/* source: include/linux/if.h */
--- a/compat/compat_firmware_class.c
+++ b/compat/compat_firmware_class.c
@@ -20,6 +20,8 @@
#include <linux/highmem.h>
#include <linux/firmware.h>
+#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
+
#define to_dev(obj) container_of(obj, struct device, kobj)
MODULE_AUTHOR("Manuel Estrada Sainz");
@@ -724,3 +726,5 @@ module_exit(firmware_class_exit);
EXPORT_SYMBOL(release_firmware);
EXPORT_SYMBOL(request_firmware);
EXPORT_SYMBOL(request_firmware_nowait);
+
+#endif
|