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:

zatwierdzone przez
Miquel Raynal

rodzic
32813e2884
commit
6a1b66d6c8
@@ -853,7 +853,7 @@ static int tegra_nand_get_strength(struct nand_chip *chip, const int *strength,
|
||||
} else {
|
||||
strength_sel = strength[i];
|
||||
|
||||
if (strength_sel < chip->ecc_strength_ds)
|
||||
if (strength_sel < chip->base.eccreq.strength)
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -917,9 +917,9 @@ static int tegra_nand_attach_chip(struct nand_chip *chip)
|
||||
chip->ecc.mode = NAND_ECC_HW;
|
||||
chip->ecc.size = 512;
|
||||
chip->ecc.steps = mtd->writesize / chip->ecc.size;
|
||||
if (chip->ecc_step_ds != 512) {
|
||||
if (chip->base.eccreq.step_size != 512) {
|
||||
dev_err(ctrl->dev, "Unsupported step size %d\n",
|
||||
chip->ecc_step_ds);
|
||||
chip->base.eccreq.step_size);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -950,7 +950,7 @@ static int tegra_nand_attach_chip(struct nand_chip *chip)
|
||||
if (ret < 0) {
|
||||
dev_err(ctrl->dev,
|
||||
"No valid strength found, minimum %d\n",
|
||||
chip->ecc_strength_ds);
|
||||
chip->base.eccreq.strength);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user