From b5d25ab0a412c7b2e7acf12cbf9836da20cc7d1b Mon Sep 17 00:00:00 2001 From: Kevin Hao Date: Mon, 21 Oct 2013 11:12:41 +0800 Subject: [PATCH 5/5] ocf: include in ocf-compat.h 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 --- 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 4ad1223..3b54435 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 +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17) +#include +#endif #if !defined(IRQ_NONE) && !defined(IRQ_RETVAL) #define IRQ_NONE #define IRQ_HANDLED -- 1.8.1.2