Message ID | 20210127203020.9574-4-miquel.raynal@bootlin.com |
---|---|
State | Accepted |
Headers | show |
Series | Better solution for the OMAP fix | expand |
On Wed, 2021-01-27 at 20:30:14 UTC, Miquel Raynal wrote: > 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> Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next. Miquel
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;
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> --- drivers/mtd/nand/ecc-sw-hamming.c | 1 + 1 file changed, 1 insertion(+)