diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2021-01-27 21:30:14 +0100 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2021-03-11 09:37:28 +0100 |
commit | 12e0df0c6f60baf10f6ecb78a086bf1048ad9d8b (patch) | |
tree | bc8918d8c417fbef666707f09d41238a0dc081fc /drivers/mtd | |
parent | mtd: nand: ecc-bch: Populate the public nsteps field (diff) | |
download | linux-12e0df0c6f60baf10f6ecb78a086bf1048ad9d8b.tar.xz linux-12e0df0c6f60baf10f6ecb78a086bf1048ad9d8b.zip |
mtd: nand: ecc-hamming: 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-4-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/ecc-sw-hamming.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/nand/ecc-sw-hamming.c b/drivers/mtd/nand/ecc-sw-hamming.c index 6334d1d7735d..5144775e5a59 100644 --- a/drivers/mtd/nand/ecc-sw-hamming.c +++ b/drivers/mtd/nand/ecc-sw-hamming.c @@ -513,6 +513,7 @@ int nand_ecc_sw_hamming_init_ctx(struct nand_device *nand) } nand->ecc.ctx.priv = engine_conf; + nand->ecc.ctx.nsteps = mtd->writesize / conf->step_size; nand->ecc.ctx.total = engine_conf->nsteps * engine_conf->code_size; return 0; |