mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-30 08:31:03 +00:00
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>
This commit is contained in:
parent
4c6a6ea3e1
commit
422b49e289
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue