mtd: rawnand: Get rid of chip->ecc_{strength,step}_ds
nand_device embeds a nand_ecc_req object which contains the minimum strength and step-size required by the NAND device. Drop the chip->ecc_{strength,step}_ds fields and use chip->base.eccreq.{strength,step_size} instead. Signed-off-by: Boris Brezillon <bbrezillon@kernel.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
This commit is contained in:

committed by
Miquel Raynal

parent
32813e2884
commit
6a1b66d6c8
@@ -2248,9 +2248,9 @@ static int marvell_nand_ecc_init(struct mtd_info *mtd,
|
||||
int ret;
|
||||
|
||||
if (ecc->mode != NAND_ECC_NONE && (!ecc->size || !ecc->strength)) {
|
||||
if (chip->ecc_step_ds && chip->ecc_strength_ds) {
|
||||
ecc->size = chip->ecc_step_ds;
|
||||
ecc->strength = chip->ecc_strength_ds;
|
||||
if (chip->base.eccreq.step_size && chip->base.eccreq.strength) {
|
||||
ecc->size = chip->base.eccreq.step_size;
|
||||
ecc->strength = chip->base.eccreq.strength;
|
||||
} else {
|
||||
dev_info(nfc->dev,
|
||||
"No minimum ECC strength, using 1b/512B\n");
|
||||
|
Reference in New Issue
Block a user