arch/powerpc: Simplify some calculations using ARRAY_SIZE() macro.
[platform/kernel/u-boot.git] / arch / powerpc / cpu / ppc4xx / reginfo.c
index 339d38a..a42327e 100644 (file)
@@ -321,7 +321,7 @@ void ppc4xx_reginfo(void)
        PRINT_DCR(OPB2PLB40_BCTRL);
        PRINT_DCR(P4P3BO0_CFG);
 #endif
-       n = sizeof(ppc4xx_reg) / sizeof(ppc4xx_reg[0]);
+       n = ARRAY_SIZE(ppc4xx_reg);
        for (i = 0; i < n; i++) {
                value = 0;
                type = ppc4xx_reg[i].type;