summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/raw/marvell_nand.c
diff options
context:
space:
mode:
authorBoris Brezillon <bbrezillon@kernel.org>2018-11-04 16:09:42 +0100
committerMiquel Raynal <miquel.raynal@bootlin.com>2019-04-08 10:21:16 +0200
commit6a1b66d6c8d691b1395d5c3b660ac4469c25bc28 (patch)
treea912c891f509bdbe47c80c7f7e31d84885ca613a /drivers/mtd/nand/raw/marvell_nand.c
parent32813e288414fecce18f37f8f0d0414a64b45c56 (diff)
downloadlinux-stable-6a1b66d6c8d691b1395d5c3b660ac4469c25bc28.tar.gz
linux-stable-6a1b66d6c8d691b1395d5c3b660ac4469c25bc28.tar.bz2
linux-stable-6a1b66d6c8d691b1395d5c3b660ac4469c25bc28.zip
mtd: rawnand: Get rid of chip->ecc_{strength,step}_ds
nand_device embeds a nand_ecc_req object which contains the minimum strength and step-size required by the NAND device. Drop the chip->ecc_{strength,step}_ds fields and use chip->base.eccreq.{strength,step_size} instead. Signed-off-by: Boris Brezillon <bbrezillon@kernel.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Diffstat (limited to 'drivers/mtd/nand/raw/marvell_nand.c')
-rw-r--r--drivers/mtd/nand/raw/marvell_nand.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
index e81d401ee16c..825c47b3fa0d 100644
--- a/drivers/mtd/nand/raw/marvell_nand.c
+++ b/drivers/mtd/nand/raw/marvell_nand.c
@@ -2248,9 +2248,9 @@ static int marvell_nand_ecc_init(struct mtd_info *mtd,
int ret;
if (ecc->mode != NAND_ECC_NONE && (!ecc->size || !ecc->strength)) {
- if (chip->ecc_step_ds && chip->ecc_strength_ds) {
- ecc->size = chip->ecc_step_ds;
- ecc->strength = chip->ecc_strength_ds;
+ if (chip->base.eccreq.step_size && chip->base.eccreq.strength) {
+ ecc->size = chip->base.eccreq.step_size;
+ ecc->strength = chip->base.eccreq.strength;
} else {
dev_info(nfc->dev,
"No minimum ECC strength, using 1b/512B\n");