diff options
author | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-02-12 22:03:11 +0100 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-03-21 09:50:56 +0100 |
commit | e7bfb3fdbde3bfeeeb64e2d73ac6babe59519c9e (patch) | |
tree | f8aaed7657f3b7af86cdf2b5eade135e0f9f740b /drivers/mtd/ubi | |
parent | mtd: Unconditionally update ->fail_addr and ->addr in part_erase() (diff) | |
download | linux-e7bfb3fdbde3bfeeeb64e2d73ac6babe59519c9e.tar.xz linux-e7bfb3fdbde3bfeeeb64e2d73ac6babe59519c9e.zip |
mtd: Stop updating erase_info->state and calling mtd_erase_callback()
MTD users are no longer checking erase_info->state to determine if the
erase operation failed or succeeded. Moreover, mtd_erase_callback() is
now a NOP.
We can safely get rid of all mtd_erase_callback() calls and all
erase_info->state assignments. While at it, get rid of the
erase_info->state field, all MTD_ERASE_XXX definitions and the
mtd_erase_callback() function.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Bert Kenward <bkenward@solarflare.com>
---
Changes in v2:
- Address a few coding style issues (reported by Miquel)
- Remove comments that are no longer valid (reported by Miquel)
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r-- | drivers/mtd/ubi/gluebi.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/gluebi.c b/drivers/mtd/ubi/gluebi.c index 1cb287ec32ad..6b655a53113b 100644 --- a/drivers/mtd/ubi/gluebi.c +++ b/drivers/mtd/ubi/gluebi.c @@ -272,12 +272,9 @@ static int gluebi_erase(struct mtd_info *mtd, struct erase_info *instr) if (err) goto out_err; - instr->state = MTD_ERASE_DONE; - mtd_erase_callback(instr); return 0; out_err: - instr->state = MTD_ERASE_FAILED; instr->fail_addr = (long long)lnum * mtd->erasesize; return err; } |