The ARRAY_SIZE macro is convenient, yet mostly unused. Switch lots of
[coreboot.git] / src / mainboard / tyan / s2892 / get_bus_conf.c
index 4f215ce9aea0903a003a60355d805a5920d90718..4869b31c4673f737d383b8daff5cc851bbf89d51 100644 (file)
@@ -8,6 +8,7 @@
 #endif
 
 #include <cpu/amd/amdk8_sysconf.h>
+#include <stdlib.h>
 
 // Global variables for MB layouts and these will be shared by irqtable mptable and acpi_tables
 //busnum is default
@@ -68,7 +69,7 @@ void get_bus_conf(void)
 
         get_bus_conf_done = 1;
 
-        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];