summaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/nand_ecc.h
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 /include/linux/mtd/nand_ecc.h
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 'include/linux/mtd/nand_ecc.h')
-rw-r--r--include/linux/mtd/nand_ecc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/mtd/nand_ecc.h b/include/linux/mtd/nand_ecc.h
index 8a2decf7462c..a514e62ff54f 100644
--- a/include/linux/mtd/nand_ecc.h
+++ b/include/linux/mtd/nand_ecc.h
@@ -14,6 +14,7 @@
#define __MTD_NAND_ECC_H__
struct mtd_info;
+struct nand_chip;
/*
* Calculate 3 byte ECC code for eccsize byte block
@@ -24,7 +25,8 @@ void __nand_calculate_ecc(const u_char *dat, unsigned int eccsize,
/*
* Calculate 3 byte ECC code for 256/512 byte block
*/
-int nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code);
+int nand_calculate_ecc(struct nand_chip *chip, const u_char *dat,
+ u_char *ecc_code);
/*
* Detect and correct a 1 bit error for eccsize byte block