Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0b37fad authored by Yinghai Lu's avatar Yinghai Lu Committed by Benjamin Herrenschmidt
Browse files

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: default avatarYinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 25818f0f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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 */