diff options
author | Boris BREZILLON <boris.brezillon@free-electrons.com> | 2015-12-01 12:03:03 +0100 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-12-08 10:46:14 -0800 |
commit | 862eba519e79c48fb6ee276081ddb98fe6926f02 (patch) | |
tree | 95b7adf71c1b1f44f0c56cebf8a19d6602cf886c /drivers/mtd/nand/nand_ecc.c | |
parent | 7326ffef788dd5823c820a6ac5b5e864e8a486a0 (diff) |
mtd: nand: make use of mtd_to_nand() in NAND core code
mtd_to_nand() was recently introduced to avoid direct access to the
mtd->priv field. Update core code to use mtd_to_nand().
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/nand/nand_ecc.c')
-rw-r--r-- | drivers/mtd/nand/nand_ecc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c index 97c4c0216c90..e6129851bfd8 100644 --- a/drivers/mtd/nand/nand_ecc.c +++ b/drivers/mtd/nand/nand_ecc.c @@ -424,7 +424,7 @@ int nand_calculate_ecc(struct mtd_info *mtd, const unsigned char *buf, unsigned char *code) { __nand_calculate_ecc(buf, - ((struct nand_chip *)mtd->priv)->ecc.size, code); + mtd_to_nand(mtd)->ecc.size, code); return 0; } @@ -524,7 +524,7 @@ int nand_correct_data(struct mtd_info *mtd, unsigned char *buf, unsigned char *read_ecc, unsigned char *calc_ecc) { return __nand_correct_data(buf, read_ecc, calc_ecc, - ((struct nand_chip *)mtd->priv)->ecc.size); + mtd_to_nand(mtd)->ecc.size); } EXPORT_SYMBOL(nand_correct_data); |