diff options
author | Josh Wu <josh.wu@atmel.com> | 2016-01-25 14:06:35 +0800 |
---|---|---|
committer | Andreas Bießmann <andreas.devel@googlemail.com> | 2016-01-27 13:58:59 +0100 |
commit | 422b49e2895ef61a1cc454aca6dd79a8e2279eff (patch) | |
tree | 7bf38619b96ce65dad6d457a40a2c2cb0090bce5 /drivers/mtd | |
parent | 4c6a6ea3e11844f1b7242d7ed4468bb80ae81369 (diff) | |
download | u-boot-422b49e2895ef61a1cc454aca6dd79a8e2279eff.tar.gz u-boot-422b49e2895ef61a1cc454aca6dd79a8e2279eff.tar.xz u-boot-422b49e2895ef61a1cc454aca6dd79a8e2279eff.zip |
atmel_nand: use the definition: PMECC_OOB_RESERVED_BYTES instead magic number
As atmel_nand_ecc.h is sync with v4.1 kernel, which adds the
PMECC_OOB_RESERVED_BYTES. So use it in the driver.
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/atmel_nand.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 852883bfb2..73fd403886 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c @@ -901,7 +901,7 @@ static int atmel_pmecc_nand_init_params(struct nand_chip *nand, return -EINVAL; } - if (nand->ecc.bytes > mtd->oobsize - 2) { + if (nand->ecc.bytes > mtd->oobsize - PMECC_OOB_RESERVED_BYTES) { dev_err(host->dev, "No room for ECC bytes\n"); return -EINVAL; } |