The ARRAY_SIZE macro is convenient, yet mostly unused. Switch lots of
[coreboot.git] / src / mainboard / amd / serengeti_cheetah / get_bus_conf.c
index d76b1ef2b9e63b1c84a4a8ff6f735044e0ceb793..f1b374ae95e3961d218f218e53fe376fc3164d4d 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <cpu/amd/amdk8_sysconf.h>
 
+#include <stdlib.h>
 #include "mb_sysconf.h"
 
 // Global variables for MB layouts and these will be shared by irqtable mptable and acpi_tables
@@ -90,7 +91,7 @@ void get_bus_conf(void)
        
        m = sysconf.mb;
 
-       sysconf.hc_possible_num = sizeof(pci1234x)/sizeof(pci1234x[0]); 
+       sysconf.hc_possible_num = ARRAY_SIZE(pci1234x); 
        for(i=0;i<sysconf.hc_possible_num; i++) {
                sysconf.pci1234[i] = pci1234x[i];
                sysconf.hcdn[i] = hcdnx[i];