summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2010-07-28 15:28:21 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-08-05 12:56:32 +1000
commitf0b37fad9a63217c39997b2d2b31f44e3d8be727 (patch)
treeac98bee1b6f0a3d3c4f7907ddcbc11e81fd8c882 /include/linux
parent25818f0f288cd5333ba5a90ad6dde3def4c4ff58 (diff)
downloadlinux-stable-f0b37fad9a63217c39997b2d2b31f44e3d8be727.tar.gz
linux-stable-f0b37fad9a63217c39997b2d2b31f44e3d8be727.tar.bz2
linux-stable-f0b37fad9a63217c39997b2d2b31f44e3d8be727.zip
memblock: Protect memblock.h with CONFIG_HAVE_MEMBLOCK
This should make it easier to catch/debug incorrect use when the CONFIG_ option isn't set. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/memblock.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index dfa64494ced1..c24b27849096 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -2,6 +2,7 @@
#define _LINUX_MEMBLOCK_H
#ifdef __KERNEL__
+#ifdef CONFIG_HAVE_MEMBLOCK
/*
* Logical memory blocks.
*
@@ -148,6 +149,8 @@ static inline unsigned long memblock_region_pages(const struct memblock_region *
region++)
+#endif /* CONFIG_HAVE_MEMBLOCK */
+
#endif /* __KERNEL__ */
#endif /* _LINUX_MEMBLOCK_H */