]> git.openfabrics.org - ~emulex/for-vlad/compat.git/commitdiff
compat: fix firmware class compile on linux 2.6.32
authorFelix Fietkau <nbd@openwrt.org>
Tue, 19 Jan 2010 19:19:07 +0000 (11:19 -0800)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Tue, 19 Jan 2010 19:19:07 +0000 (11:19 -0800)
The firmware class API change happened after 2.6.32, so move the compat
code to the 2.6.33 header file.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
include/linux/compat-2.6.32.h
include/linux/compat-2.6.33.h

index fbdde5278369d944c31598f54ec57a4d5ab0ae6b..c3e4dbec6570fe636b85aef83656c0a4b1aec209 100644 (file)
@@ -9,40 +9,6 @@
 #include <asm/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
index da5821b82e43e8822fd104c105ca32fadbaa1cdf..73fc91c8a0de2603e62c7a9cb97e46e9afc3f1b6 100644 (file)
 #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 */