summaryrefslogtreecommitdiff
path: root/src/mainboard/msi/ms7260
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/msi/ms7260')
-rw-r--r--src/mainboard/msi/ms7260/get_bus_conf.c3
-rw-r--r--src/mainboard/msi/ms7260/resourcemap.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/mainboard/msi/ms7260/get_bus_conf.c b/src/mainboard/msi/ms7260/get_bus_conf.c
index 19d80f536d..47273cdaa4 100644
--- a/src/mainboard/msi/ms7260/get_bus_conf.c
+++ b/src/mainboard/msi/ms7260/get_bus_conf.c
@@ -28,6 +28,7 @@
#include <cpu/amd/dualcore.h>
#endif
#include <cpu/amd/amdk8_sysconf.h>
+#include <stdlib.h>
/* Global variables for MB layouts (shared by irqtable/mptable/acpi_table). */
// busnum is default.
@@ -81,7 +82,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];
diff --git a/src/mainboard/msi/ms7260/resourcemap.c b/src/mainboard/msi/ms7260/resourcemap.c
index 5035ac815c..d72530a3ae 100644
--- a/src/mainboard/msi/ms7260/resourcemap.c
+++ b/src/mainboard/msi/ms7260/resourcemap.c
@@ -278,6 +278,6 @@ static void setup_mb_resource_map(void)
};
- int max = sizeof(register_values) / sizeof(register_values[0]);
+ int max = ARRAY_SIZE(register_values);
setup_resource_map(register_values, max);
}