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>
This commit is contained in:
Yinghai Lu 2010-07-28 15:28:21 +10:00 committed by Benjamin Herrenschmidt
parent 25818f0f28
commit f0b37fad9a
1 changed files with 3 additions and 0 deletions

View File

@ -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 */