mtd: spinand: Propagate ECC information to the MTD structure
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 13 May 2020 13:10:29 +0000 (15:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 May 2020 15:46:11 +0000 (17:46 +0200)
commit725b0bb0f94d384d4cea2baedcf44b84041ff03e
treef4453117acdafbeb09d5380067825d440bc6c807
parente3637eb6a35182f5432f6e3c647cc84c86765d18
mtd: spinand: Propagate ECC information to the MTD structure

[ Upstream commit 3507273d5a4d3c2e46f9d3f9ed9449805f5dff07 ]

This is done by default in the raw NAND core (nand_base.c) but was
missing in the SPI-NAND core. Without these two lines the ecc_strength
and ecc_step_size values are not exported to the user through sysfs.

Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mtd/nand/spi/core.c