summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/raw/ndfc.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@bootlin.com>2018-09-06 14:05:18 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2018-10-03 11:12:25 +0200
commitaf37d2c3a8c7a05cf5b0fe6b61e2a6b9e357928b (patch)
tree94578eb3390370a5edcadf5c94304690b48663a7 /drivers/mtd/nand/raw/ndfc.c
parentec47636cd7e7b0dd53e526ec832ebb21b67ad9c6 (diff)
downloadlinux-af37d2c3a8c7a05cf5b0fe6b61e2a6b9e357928b.tar.bz2
mtd: rawnand: Pass a nand_chip object to ecc->calculate()
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. Now is ecc->calculate()'s turn. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand/raw/ndfc.c')
-rw-r--r--drivers/mtd/nand/raw/ndfc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/ndfc.c b/drivers/mtd/nand/raw/ndfc.c
index f9648d87b2e7..9241cfaab5ac 100644
--- a/drivers/mtd/nand/raw/ndfc.c
+++ b/drivers/mtd/nand/raw/ndfc.c
@@ -92,10 +92,9 @@ static void ndfc_enable_hwecc(struct nand_chip *chip, int mode)
wmb();
}
-static int ndfc_calculate_ecc(struct mtd_info *mtd,
+static int ndfc_calculate_ecc(struct nand_chip *chip,
const u_char *dat, u_char *ecc_code)
{
- struct nand_chip *chip = mtd_to_nand(mtd);
struct ndfc_controller *ndfc = nand_get_controller_data(chip);
uint32_t ecc;
uint8_t *p = (uint8_t *)&ecc;