Merge branch 'sched/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[pandora-kernel.git] / arch / x86 / boot / memory.c
index e77d89f..53165c9 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;
 }