diff options
author | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-09-06 15:05:18 +0300 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2018-10-03 12:12:25 +0300 |
commit | af37d2c3a8c7a05cf5b0fe6b61e2a6b9e357928b (patch) | |
tree | 94578eb3390370a5edcadf5c94304690b48663a7 /include/linux/mtd/nand_bch.h | |
parent | ec47636cd7e7b0dd53e526ec832ebb21b67ad9c6 (diff) | |
download | linux-af37d2c3a8c7a05cf5b0fe6b61e2a6b9e357928b.tar.xz |
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_bch.h')
-rw-r--r-- | include/linux/mtd/nand_bch.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/mtd/nand_bch.h b/include/linux/mtd/nand_bch.h index 98f20ef05d60..6db133508960 100644 --- a/include/linux/mtd/nand_bch.h +++ b/include/linux/mtd/nand_bch.h @@ -12,6 +12,7 @@ #define __MTD_NAND_BCH_H__ struct mtd_info; +struct nand_chip; struct nand_bch_control; #if defined(CONFIG_MTD_NAND_ECC_BCH) @@ -21,7 +22,7 @@ static inline int mtd_nand_has_bch(void) { return 1; } /* * Calculate BCH ecc code */ -int nand_bch_calculate_ecc(struct mtd_info *mtd, const u_char *dat, +int nand_bch_calculate_ecc(struct nand_chip *chip, const u_char *dat, u_char *ecc_code); /* @@ -43,7 +44,7 @@ void nand_bch_free(struct nand_bch_control *nbc); static inline int mtd_nand_has_bch(void) { return 0; } static inline int -nand_bch_calculate_ecc(struct mtd_info *mtd, const u_char *dat, +nand_bch_calculate_ecc(struct nand_chip *chip, const u_char *dat, u_char *ecc_code) { return -1; |