summaryrefslogtreecommitdiff
path: root/src/northbridge/via
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge/via')
-rw-r--r--src/northbridge/via/vt8601/northbridge.c2
-rw-r--r--src/northbridge/via/vt8623/northbridge.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/northbridge/via/vt8601/northbridge.c b/src/northbridge/via/vt8601/northbridge.c
index 76d93f0ddb..36a118ca71 100644
--- a/src/northbridge/via/vt8601/northbridge.c
+++ b/src/northbridge/via/vt8601/northbridge.c
@@ -115,7 +115,7 @@ static void pci_domain_set_resources(device_t dev)
unsigned char rambits;
int i, idx;
- for(rambits = 0, i = 0; i < sizeof(ramregs)/sizeof(ramregs[0]); i++) {
+ for(rambits = 0, i = 0; i < ARRAY_SIZE(ramregs); i++) {
unsigned char reg;
reg = pci_read_config8(mc_dev, ramregs[i]);
/* these are ENDING addresses, not sizes.
diff --git a/src/northbridge/via/vt8623/northbridge.c b/src/northbridge/via/vt8623/northbridge.c
index e2bab04afe..80a314c18a 100644
--- a/src/northbridge/via/vt8623/northbridge.c
+++ b/src/northbridge/via/vt8623/northbridge.c
@@ -287,7 +287,7 @@ static void pci_domain_set_resources(device_t dev)
unsigned char rambits;
int i, idx;
- for(rambits = 0, i = 0; i < sizeof(ramregs)/sizeof(ramregs[0]); i++) {
+ for(rambits = 0, i = 0; i < ARRAY_SIZE(ramregs); i++) {
unsigned char reg;
reg = pci_read_config8(mc_dev, ramregs[i]);
/* these are ENDING addresses, not sizes.