compat-wireless: add sched.h on libertas/firmware.c
authorLuis R. Rodriguez <mcgrof@frijolero.org>
Tue, 24 Apr 2012 01:01:21 +0000 (18:01 -0700)
committerLuis R. Rodriguez <mcgrof@frijolero.org>
Tue, 24 Apr 2012 01:01:21 +0000 (18:01 -0700)
sched.h is required to compile users of wake_up(),
firmware.c somehow gets sched.h included on newer kernels
but on older kernels this is not happening so include
this on the file itself. This patch should and will
be sent upstream.

This fixes this compilation error:

/home/mcgrof/devel/compat-wireless/drivers/net/wireless/libertas/firmware.c: In function ‘lbs_fw_loaded’:
/home/mcgrof/devel/compat-wireless/drivers/net/wireless/libertas/firmware.c:26:29: error: ‘TASK_NORMAL’ undeclared (first use in this function)
/home/mcgrof/devel/compat-wireless/drivers/net/wireless/libertas/firmware.c:26:29: note: each undeclared identifier is reported only once for each function it appears in
/home/mcgrof/devel/compat-wireless/drivers/net/wireless/libertas/firmware.c: In function ‘lbs_wait_for_firmware_load’:
/home/mcgrof/devel/compat-wireless/drivers/net/wireless/libertas/firmware.c:110:260: error: ‘TASK_UNINTERRUPTIBLE’ undeclared (first use in this function)
/home/mcgrof/devel/compat-wireless/drivers/net/wireless/libertas/firmware.c:110:2: error: implicit declaration of function ‘schedule’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors

make[4]: *** [/home/mcgrof/devel/compat-wireless/drivers/net/wireless/libertas/firmware.o] Error 1

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
patches/55-sched.patch [new file with mode: 0644]

diff --git a/patches/55-sched.patch b/patches/55-sched.patch
new file mode 100644 (file)
index 0000000..67830a2
--- /dev/null
@@ -0,0 +1,17 @@
+
+sched.h is required to compile users of wake_up(),
+firmware.c somehow gets sched.h included on newer kernels
+but on older kernels this is not happening so include
+this on the file itself. This patch should and will
+be sent upstream.
+
+--- a/drivers/net/wireless/libertas/firmware.c
++++ b/drivers/net/wireless/libertas/firmware.c
+@@ -2,6 +2,7 @@
+  * Firmware loading and handling functions.
+  */
++#include <linux/sched.h>
+ #include <linux/firmware.h>
+ #include <linux/firmware.h>
+ #include <linux/module.h>