diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-07-28 01:28:21 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-08-04 22:56:32 -0400 |
commit | f0b37fad9a63217c39997b2d2b31f44e3d8be727 (patch) | |
tree | ac98bee1b6f0a3d3c4f7907ddcbc11e81fd8c882 /include | |
parent | 25818f0f288cd5333ba5a90ad6dde3def4c4ff58 (diff) |
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')
-rw-r--r-- | include/linux/memblock.h | 3 |
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 @@ | |||
2 | #define _LINUX_MEMBLOCK_H | 2 | #define _LINUX_MEMBLOCK_H |
3 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
4 | 4 | ||
5 | #ifdef CONFIG_HAVE_MEMBLOCK | ||
5 | /* | 6 | /* |
6 | * Logical memory blocks. | 7 | * Logical memory blocks. |
7 | * | 8 | * |
@@ -148,6 +149,8 @@ static inline unsigned long memblock_region_pages(const struct memblock_region * | |||
148 | region++) | 149 | region++) |
149 | 150 | ||
150 | 151 | ||
152 | #endif /* CONFIG_HAVE_MEMBLOCK */ | ||
153 | |||
151 | #endif /* __KERNEL__ */ | 154 | #endif /* __KERNEL__ */ |
152 | 155 | ||
153 | #endif /* _LINUX_MEMBLOCK_H */ | 156 | #endif /* _LINUX_MEMBLOCK_H */ |