summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/raw/txx9ndfmc.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/txx9ndfmc.c
parentmtd: rawnand: Pass a nand_chip object to ecc->hwctl() (diff)
downloadlinux-af37d2c3a8c7a05cf5b0fe6b61e2a6b9e357928b.tar.xz
linux-af37d2c3a8c7a05cf5b0fe6b61e2a6b9e357928b.zip
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/txx9ndfmc.c')
-rw-r--r--drivers/mtd/nand/raw/txx9ndfmc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/nand/raw/txx9ndfmc.c b/drivers/mtd/nand/raw/txx9ndfmc.c
index fea5bc684aa1..55a5c4d42a81 100644
--- a/drivers/mtd/nand/raw/txx9ndfmc.c
+++ b/drivers/mtd/nand/raw/txx9ndfmc.c
@@ -170,11 +170,10 @@ static int txx9ndfmc_dev_ready(struct mtd_info *mtd)
return !(txx9ndfmc_read(dev, TXX9_NDFSR) & TXX9_NDFSR_BUSY);
}
-static int txx9ndfmc_calculate_ecc(struct mtd_info *mtd, const uint8_t *dat,
+static int txx9ndfmc_calculate_ecc(struct nand_chip *chip, const uint8_t *dat,
uint8_t *ecc_code)
{
- struct platform_device *dev = mtd_to_platdev(mtd);
- struct nand_chip *chip = mtd_to_nand(mtd);
+ struct platform_device *dev = mtd_to_platdev(nand_to_mtd(chip));
int eccbytes;
u32 mcr = txx9ndfmc_read(dev, TXX9_NDFMCR);