compat: check CONFIG_COMPAT_FIRMWARE_CLASS in compat-2.6.33.h
authorJohn W. Linville <linville@tuxdriver.com>
Thu, 17 Nov 2011 22:20:41 +0000 (17:20 -0500)
committerLuis R. Rodriguez <mcgrof@qca.qualcomm.com>
Thu, 17 Nov 2011 23:22:48 +0000 (15:22 -0800)
If a pre-2.6.33 kernel has backported suitable firmware loader
functionality, then it doesn't need the compat_firmware_class.  In that
case, compat-2.6.33 should not redefine the *_firmware function names.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
include/linux/compat-2.6.33.h

index 539b46920f91fe6de6c9292c9db2cdc2df996388..e9e888a34e9581834b660d948e4b1919ee7b866e 100644 (file)
 #endif
 #include <linux/firmware.h>
 
+#if defined(CONFIG_COMPAT_FIRMWARE_CLASS)
 #define release_firmware compat_release_firmware
 #define request_firmware compat_request_firmware
 #define request_firmware_nowait compat_request_firmware_nowait
+#endif
 
 #if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
 int compat_request_firmware(const struct firmware **fw, const char *name,