Prechádzať zdrojové kódy

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>
Yinghai Lu 15 rokov pred
rodič
commit
f0b37fad9a
1 zmenil súbory, kde vykonal 3 pridanie a 0 odobranie
  1. 3 0
      include/linux/memblock.h

+ 3 - 0
include/linux/memblock.h

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