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

Miquel Raynal miquel.raynal at bootlin.com
Wed Jan 27 15:30:13 EST 2021


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 at bootlin.com>
---
 drivers/mtd/nand/ecc-sw-bch.c | 1 +
 1 file changed, 1 insertion(+)

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




More information about the linux-mtd mailing list