diff options
author | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-09-06 14:05:19 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2018-10-03 11:12:25 +0200 |
commit | 00da2ea97229946450c8145d680db480b5da1f94 (patch) | |
tree | 185839a4fbbf4bb8c377c309958b7607ae7fe29c /drivers/mtd/nand/raw/jz4740_nand.c | |
parent | af37d2c3a8c7a05cf5b0fe6b61e2a6b9e357928b (diff) | |
download | lwn-00da2ea97229946450c8145d680db480b5da1f94.tar.gz lwn-00da2ea97229946450c8145d680db480b5da1f94.zip |
mtd: rawnand: Pass a nand_chip object to ecc->correct()
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->correct()'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/jz4740_nand.c')
-rw-r--r-- | drivers/mtd/nand/raw/jz4740_nand.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/raw/jz4740_nand.c b/drivers/mtd/nand/raw/jz4740_nand.c index 98ea5172ac74..e926ed6ed296 100644 --- a/drivers/mtd/nand/raw/jz4740_nand.c +++ b/drivers/mtd/nand/raw/jz4740_nand.c @@ -215,10 +215,10 @@ static void jz_nand_correct_data(uint8_t *dat, int index, int mask) dat[index+1] = (data >> 8) & 0xff; } -static int jz_nand_correct_ecc_rs(struct mtd_info *mtd, uint8_t *dat, - uint8_t *read_ecc, uint8_t *calc_ecc) +static int jz_nand_correct_ecc_rs(struct nand_chip *chip, uint8_t *dat, + uint8_t *read_ecc, uint8_t *calc_ecc) { - struct jz_nand *nand = mtd_to_jz_nand(mtd); + struct jz_nand *nand = mtd_to_jz_nand(nand_to_mtd(chip)); int i, error_count, index; uint32_t reg, status, error; unsigned int timeout = 1000; |