X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fflash%2Fnand_ecc.c;h=7aa1519dde8fd07c9b2876f7fe38f6c29824f5f3;hb=90d09e35e4be6f0b35899238b253154249f85cb6;hp=567e3b3806982101a983dfe861507508512f5a40;hpb=310be8a838c9db6b67bc4d6d7d3c7ff41b32af4c;p=openocd.git diff --git a/src/flash/nand_ecc.c b/src/flash/nand_ecc.c index 567e3b3806..7aa1519dde 100644 --- a/src/flash/nand_ecc.c +++ b/src/flash/nand_ecc.c @@ -68,7 +68,7 @@ static const uint8_t nand_ecc_precalc_table[] = { /* * nand_calculate_ecc - Calculate 3-byte ECC for 256-byte block */ -int nand_calculate_ecc(struct nand_device_s *device, const uint8_t *dat, uint8_t *ecc_code) +int nand_calculate_ecc(struct nand_device *nand, const uint8_t *dat, uint8_t *ecc_code) { uint8_t idx, reg1, reg2, reg3, tmp1, tmp2; int i; @@ -77,7 +77,7 @@ int nand_calculate_ecc(struct nand_device_s *device, const uint8_t *dat, uint8_t reg1 = reg2 = reg3 = 0; /* Build up column parity */ - for(i = 0; i < 256; i++) { + for (i = 0; i < 256; i++) { /* Get CP0 - CP5 from table */ idx = nand_ecc_precalc_table[*dat++]; reg1 ^= (idx & 0x3f);