summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/ecc-sw-bch.c
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2021-01-27 21:30:13 +0100
committerMiquel Raynal <miquel.raynal@bootlin.com>2021-03-11 09:37:27 +0100
commit7cd37e7e958bbc1038b90c126162532a4afaa9f8 (patch)
treeadf6c15169a136f7058449c2be99ed303eef10a9 /drivers/mtd/nand/ecc-sw-bch.c
parent2bc611844b5d2c43b63bdf71ae6395fa7a6566cc (diff)
mtd: nand: ecc-bch: Populate the public nsteps field
Advertize the actual number of steps that will actually be used by the driver by populating the public field. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Tested-by: Adam Ford <aford173@gmail.com> #logicpd Torpedo Link: https://lore.kernel.org/linux-mtd/20210127203020.9574-3-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers/mtd/nand/ecc-sw-bch.c')
-rw-r--r--drivers/mtd/nand/ecc-sw-bch.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/nand/ecc-sw-bch.c b/drivers/mtd/nand/ecc-sw-bch.c
index 0a0ac11d5725..5018bc0db626 100644
--- a/drivers/mtd/nand/ecc-sw-bch.c
+++ b/drivers/mtd/nand/ecc-sw-bch.c
@@ -245,6 +245,7 @@ int nand_ecc_sw_bch_init_ctx(struct nand_device *nand)
}
nand->ecc.ctx.priv = engine_conf;
+ nand->ecc.ctx.nsteps = nsteps;
nand->ecc.ctx.total = nsteps * code_size;
ret = nand_ecc_sw_bch_init(nand);