In order to be compatible with the old kernel, the ocf-compat.h will
define the IRQ_NONE and IRQ_RETVAL to NULL if they are not defined
in other header files. So we should make sure that the file in which
these macros are defined must be included before this check. The file
"linux/irqreturn.h" was introduced only after v2.6.17, so also add
a kernel version check for this inclusion as what it did in other
part of this file.

Signed-off-by: Kevin Hao <kexin....@windriver.com>
---
 crypto/ocf/ocf-compat.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/crypto/ocf/ocf-compat.h b/crypto/ocf/ocf-compat.h
index 4ad12232bcfe..3b5443551ffd 100644
--- a/crypto/ocf/ocf-compat.h
+++ b/crypto/ocf/ocf-compat.h
@@ -205,6 +205,9 @@ struct ocf_device {
 /* older kernels don't have these */
 
 #include <asm/irq.h>
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17)
+#include <linux/irqreturn.h>
+#endif
 #if !defined(IRQ_NONE) && !defined(IRQ_RETVAL)
 #define IRQ_NONE
 #define IRQ_HANDLED
-- 
1.8.3.1

_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to