diff mbox series

[v3,2/9] mtd: nand: ecc-bch: Populate the public nsteps field

Message ID 20210127203020.9574-3-miquel.raynal@bootlin.com
State Accepted
Headers show
Series Better solution for the OMAP fix | expand

Commit Message

Miquel Raynal Jan. 27, 2021, 8:30 p.m. UTC
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-bch.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Miquel Raynal March 2, 2021, 4:33 p.m. UTC | #1
On Wed, 2021-01-27 at 20:30:13 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 mbox series

Patch

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);