mtd: rawnand: Pass a nand_chip object to chip->setup_read_retry()

Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one or
remove the mtd_info object when both are passed.

Let's tackle the chip->setup_read_retry() hook.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
Boris Brezillon
2018-09-06 14:05:32 +02:00
committed by Miquel Raynal
parent aa36ff25ff
commit 2e7f1cec27
4 changed files with 8 additions and 12 deletions

View File

@@ -74,9 +74,8 @@ struct micron_nand {
struct micron_on_die_ecc ecc;
};
static int micron_nand_setup_read_retry(struct mtd_info *mtd, int retry_mode)
static int micron_nand_setup_read_retry(struct nand_chip *chip, int retry_mode)
{
struct nand_chip *chip = mtd_to_nand(mtd);
u8 feature[ONFI_SUBFEATURE_PARAM_LEN] = {retry_mode};
return nand_set_features(chip, ONFI_FEATURE_ADDR_READ_RETRY, feature);