| From | Benjamin Herrenschmidt <> | Subject | [PATCH 41/43] memblock: Protect memblock.h with CONFIG_HAVE_MEMBLOCK | Date | Fri, 6 Aug 2010 15:15:22 +1000 |
| |
From: Yinghai Lu <yinghai@kernel.org>
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> --- 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 dfa6449..c24b278 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 */ -- 1.7.0.4
|