summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2018-09-24 11:35:18 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2018-10-08 10:00:10 +0200
commite9836761867519e1e5beb7486dc73c3d5b8877f5 (patch)
tree8fb20d0d8fde5a5be75feb0c9e6f74f3a7960604 /drivers/mtd
parent309600c14e36d0e78c22fe3df58317965b90f4d1 (diff)
downloadlinux-e9836761867519e1e5beb7486dc73c3d5b8877f5.tar.bz2
mtd: rawnand: toshiba: Pass a single nand_chip object to the status helper
Now that most of the raw NAND API is consistent and has almost all its helpers and hooks using a single nand_chip object instead of an mtd_info one (or both), let's do the same cleanup in the raw NAND vendors drivers. Apply this change to the Toshiba driver so that the internal helper to retrieve the ECC status does only take a nand_chip object. Suggested-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/raw/nand_toshiba.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/mtd/nand/raw/nand_toshiba.c b/drivers/mtd/nand/raw/nand_toshiba.c
index 941ddc615190..d068163b64b3 100644
--- a/drivers/mtd/nand/raw/nand_toshiba.c
+++ b/drivers/mtd/nand/raw/nand_toshiba.c
@@ -23,9 +23,9 @@
/* Recommended to rewrite for BENAND */
#define TOSHIBA_NAND_STATUS_REWRITE_RECOMMENDED BIT(3)
-static int toshiba_nand_benand_eccstatus(struct mtd_info *mtd,
- struct nand_chip *chip)
+static int toshiba_nand_benand_eccstatus(struct nand_chip *chip)
{
+ struct mtd_info *mtd = nand_to_mtd(chip);
int ret;
unsigned int max_bitflips = 0;
u8 status;
@@ -51,21 +51,19 @@ static int
toshiba_nand_read_page_benand(struct nand_chip *chip, uint8_t *buf,
int oob_required, int page)
{
- struct mtd_info *mtd = nand_to_mtd(chip);
int ret;
ret = nand_read_page_raw(chip, buf, oob_required, page);
if (ret)
return ret;
- return toshiba_nand_benand_eccstatus(mtd, chip);
+ return toshiba_nand_benand_eccstatus(chip);
}
static int
toshiba_nand_read_subpage_benand(struct nand_chip *chip, uint32_t data_offs,
uint32_t readlen, uint8_t *bufpoi, int page)
{
- struct mtd_info *mtd = nand_to_mtd(chip);
int ret;
ret = nand_read_page_op(chip, page, data_offs,
@@ -73,7 +71,7 @@ toshiba_nand_read_subpage_benand(struct nand_chip *chip, uint32_t data_offs,
if (ret)
return ret;
- return toshiba_nand_benand_eccstatus(mtd, chip);
+ return toshiba_nand_benand_eccstatus(chip);
}
static void toshiba_nand_benand_init(struct nand_chip *chip)