]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/x86/boot/memory.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[karo-tx-linux.git] / arch / x86 / boot / memory.c
index e77d89f9e8aa23c13751bee268718e8ed7ee54a7..53165c97336b21406f49307cb4932c87468d32d9 100644 (file)
@@ -9,12 +9,11 @@
  * ----------------------------------------------------------------------- */
 
 /*
- * arch/i386/boot/memory.c
- *
  * Memory detection code
  */
 
 #include "boot.h"
+#include <linux/kernel.h>
 
 #define SMAP   0x534d4150      /* ASCII "SMAP" */
 
@@ -55,7 +54,7 @@ static int detect_memory_e820(void)
 
                count++;
                desc++;
-       } while (next && count < E820MAX);
+       } while (next && count < ARRAY_SIZE(boot_params.e820_map));
 
        return boot_params.e820_entries = count;
 }