mtd: nand: Use standard large page OOB layout when using NAND_ECC_NONE
authorMiquel Raynal <miquel.raynal@free-electrons.com>
Sat, 26 Aug 2017 15:19:15 +0000 (17:19 +0200)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Mon, 18 Sep 2017 12:53:24 +0000 (14:53 +0200)
commit882fd1577cbe7812ae3a48988180c5f0fda475ca
tree9db471e718661368fb9d9861c0c1f2db7f7a956e
parent2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e
mtd: nand: Use standard large page OOB layout when using NAND_ECC_NONE

Use the core's large page OOB layout functions when not reserving any
space for ECC bytes in the OOB layout. Fix ->nand_ooblayout_ecc_lp()
to return -ERANGE instead of a zero length in this case.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/nand_base.c