forked from Minki/linux
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:
parent
25818f0f28
commit
f0b37fad9a
@ -2,6 +2,7 @@
|
|||||||
#define _LINUX_MEMBLOCK_H
|
#define _LINUX_MEMBLOCK_H
|
||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
|
|
||||||
|
#ifdef CONFIG_HAVE_MEMBLOCK
|
||||||
/*
|
/*
|
||||||
* Logical memory blocks.
|
* Logical memory blocks.
|
||||||
*
|
*
|
||||||
@ -148,6 +149,8 @@ static inline unsigned long memblock_region_pages(const struct memblock_region *
|
|||||||
region++)
|
region++)
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* CONFIG_HAVE_MEMBLOCK */
|
||||||
|
|
||||||
#endif /* __KERNEL__ */
|
#endif /* __KERNEL__ */
|
||||||
|
|
||||||
#endif /* _LINUX_MEMBLOCK_H */
|
#endif /* _LINUX_MEMBLOCK_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user