summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens2011-10-04 06:11:47 -0500
committerLuis R. Rodriguez2011-10-04 19:41:40 -0500
commit966e8478176097f929df89406291aa75bb574984 (patch)
tree5261d90b040271608e477985b152de43648f9e79
parenta839eee468e9d9b9df92251374acc10c42020faf (diff)
downloadcompat-966e8478176097f929df89406291aa75bb574984.tar.gz
compat-966e8478176097f929df89406291aa75bb574984.tar.xz
compat-966e8478176097f929df89406291aa75bb574984.zip
compat: add linux/of.h just when CONFIG_OF is set.
In kernel < 2.6.34 linux/of.h unconditionally includes asm/prom.h which is not available on all architectures. In newer kernel versions this is just included if CONFIG_OF is set. For these old kernel just include linux/of.h when CONFIG_OF is set. This fixes a compile problem with ath6kl as it uses linux/of.h only when CONFIG_OF is set. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--include/linux/of.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
new file mode 100644
index 0000000..c5dc87c
--- /dev/null
+++ b/include/linux/of.h
@@ -0,0 +1,16 @@
1#ifndef _COMPAT_LINUX_OF_H
2#define _COMPAT_LINUX_OF_H 1
3
4#include <linux/version.h>
5
6#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
7#include_next <linux/of.h>
8#else
9
10#ifdef CONFIG_OF
11#include_next <linux/of.h>
12#endif /* CONFIG_OF */
13
14#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */
15
16#endif /* _COMPAT_LINUX_OF_H */