aboutsummaryrefslogtreecommitdiffstats
path: root/features/ocf/ocf-include-linux-irqreturn.h-in-ocf-compat.h.patch
blob: 901973d1d5ce4e5922411e15da6747b35ec94589 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From b5d25ab0a412c7b2e7acf12cbf9836da20cc7d1b Mon Sep 17 00:00:00 2001
From: Kevin Hao <kexin.hao@windriver.com>
Date: Mon, 21 Oct 2013 11:12:41 +0800
Subject: [PATCH 5/5] ocf: include <linux/irqreturn.h> 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 <kexin.hao@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 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 <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.1.2