Skip to content

Commit 3507273

Browse files
miquelraynalrichardweinberger
authored andcommitted
mtd: spinand: Propagate ECC information to the MTD structure
This is done by default in the raw NAND core (nand_base.c) but was missing in the SPI-NAND core. Without these two lines the ecc_strength and ecc_step_size values are not exported to the user through sysfs. Fixes: 7529df4 ("mtd: nand: Add core infrastructure to support SPI NANDs") Cc: [email protected] Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 9b1f2cb commit 3507273

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/mtd/nand/spi/core.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,6 +1089,10 @@ static int spinand_init(struct spinand_device *spinand)
10891089

10901090
mtd->oobavail = ret;
10911091

1092+
/* Propagate ECC information to mtd_info */
1093+
mtd->ecc_strength = nand->eccreq.strength;
1094+
mtd->ecc_step_size = nand->eccreq.step_size;
1095+
10921096
return 0;
10931097

10941098
err_cleanup_nanddev:

0 commit comments

Comments
 (0)