Commit 12e0df0c authored by Miquel Raynal's avatar Miquel Raynal
Browse files

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: default avatarMiquel 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
parent 7cd37e7e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;